xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.drawing
include
xtd
drawing
hsl.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include <xtd/byte>
6
#include <xtd/string>
7
#include <xtd/uint32>
8
10
namespace
xtd
{
12
namespace
drawing
{
22
struct
hsl
{
24
28
xtd::single
hue
= .0f;
31
xtd::single
saturation
= .0f;
34
xtd::single
lightness
= .0f;
36
38
45
[[nodiscard]]
static
auto
from_hsl
(
xtd::single
hue
,
xtd::single
saturation
,
xtd::single
lightness
)
noexcept
->
xtd::drawing::hsl
{
46
return
hsl
{.hue =
hue
, .saturation =
saturation
, .lightness =
lightness
};
47
}
48
51
[[nodiscard]]
static
auto
from_hsl
(
const
hsl
& value)
noexcept
->
xtd::drawing::hsl
{
52
return
value;
53
}
54
55
57
friend
auto
operator <<(std::ostream& os,
const
hsl
& value) -> std::ostream& {
58
return
os <<
xtd::string::format
(
"hsl [hue = {}, saturation = {}, lightness = {}]"
, value.hue, value.saturation, value.lightness);
59
};
61
};
62
}
63
}
xtd::basic_string< char >::format
static auto format(const basic_string< char > &fmt, args_t &&... args) -> basic_string
xtd::single
float single
Represents a single-precision floating-point number.
Definition
single.hpp:23
xtd::drawing
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition
actions_system_images.hpp:10
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
xtd::drawing::hsl
The hsl struct.
Definition
hsl.hpp:22
xtd::drawing::hsl::lightness
xtd::single lightness
Gets or sets the lightness component value of this xtd::drawing::hsl struct.
Definition
hsl.hpp:34
xtd::drawing::hsl::from_hsl
static auto from_hsl(xtd::single hue, xtd::single saturation, xtd::single lightness) noexcept -> xtd::drawing::hsl
Creates a xtd::hsl struct from the specified hue, saturation, and lightness single values.
Definition
hsl.hpp:45
xtd::drawing::hsl::saturation
xtd::single saturation
Gets or sets the saturation component value of this xtd::drawing::hsl struct.
Definition
hsl.hpp:31
xtd::drawing::hsl::hue
xtd::single hue
Gets or sets the hue component value of this xtd::drawing::hsl struct.
Definition
hsl.hpp:28
xtd::drawing::hsl::from_hsl
static auto from_hsl(const hsl &value) noexcept -> xtd::drawing::hsl
Creates a xtd::hsl struct from the specified axtd::drawing::hsl value.
Definition
hsl.hpp:51
Generated on
for xtd by
Gammasoft
. All rights reserved.