Flutter Engine
The Flutter Engine
|
#include <color.h>
Public Member Functions | |
constexpr | Color () |
Color (const ColorHSB &hsbColor) | |
Color (const Vector4 &value) | |
constexpr | Color (Scalar r, Scalar g, Scalar b, Scalar a) |
constexpr bool | operator== (const Color &c) const |
constexpr Color | operator+ (const Color &c) const |
template<class T , class = std::enable_if_t<std::is_arithmetic_v<T>>> | |
constexpr Color | operator+ (T value) const |
constexpr Color | operator- (const Color &c) const |
template<class T , class = std::enable_if_t<std::is_arithmetic_v<T>>> | |
constexpr Color | operator- (T value) const |
constexpr Color | operator* (const Color &c) const |
template<class T , class = std::enable_if_t<std::is_arithmetic_v<T>>> | |
constexpr Color | operator* (T value) const |
constexpr Color | operator/ (const Color &c) const |
template<class T , class = std::enable_if_t<std::is_arithmetic_v<T>>> | |
constexpr Color | operator/ (T value) const |
constexpr Color | Premultiply () const |
constexpr Color | Unpremultiply () const |
constexpr Color | Clamp01 () const |
constexpr std::array< uint8_t, 4 > | ToR8G8B8A8 () const |
Convert to R8G8B8A8 representation. More... | |
constexpr uint32_t | ToARGB () const |
Convert to ARGB 32 bit color. More... | |
constexpr Color | WithAlpha (Scalar new_alpha) const |
Color | Blend (Color source, BlendMode blend_mode) const |
Blends an unpremultiplied destination color into a given unpremultiplied source color to form a new unpremultiplied color. More... | |
Color | ApplyColorMatrix (const ColorMatrix &color_matrix) const |
A color filter that transforms colors through a 4x5 color matrix. More... | |
Color | LinearToSRGB () const |
Convert the color from linear space to sRGB space. More... | |
Color | SRGBToLinear () const |
Convert the color from sRGB space to linear space. More... | |
constexpr bool | IsTransparent () const |
constexpr bool | IsOpaque () const |
Static Public Member Functions | |
static constexpr Color | MakeRGBA8 (uint8_t r, uint8_t g, uint8_t b, uint8_t a) |
static constexpr uint32_t | ToIColor (Color color) |
Convert this color to a 32-bit representation. More... | |
static constexpr Color | Lerp (Color a, Color b, Scalar t) |
Return a color that is linearly interpolated between colors a and b, according to the value of t. More... | |
static constexpr Color | White () |
static constexpr Color | Black () |
static constexpr Color | WhiteTransparent () |
static constexpr Color | BlackTransparent () |
static constexpr Color | Red () |
static constexpr Color | Green () |
static constexpr Color | Blue () |
static constexpr Color | AliceBlue () |
static constexpr Color | AntiqueWhite () |
static constexpr Color | Aqua () |
static constexpr Color | AquaMarine () |
static constexpr Color | Azure () |
static constexpr Color | Beige () |
static constexpr Color | Bisque () |
static constexpr Color | BlanchedAlmond () |
static constexpr Color | BlueViolet () |
static constexpr Color | Brown () |
static constexpr Color | BurlyWood () |
static constexpr Color | CadetBlue () |
static constexpr Color | Chartreuse () |
static constexpr Color | Chocolate () |
static constexpr Color | Coral () |
static constexpr Color | CornflowerBlue () |
static constexpr Color | Cornsilk () |
static constexpr Color | Crimson () |
static constexpr Color | Cyan () |
static constexpr Color | DarkBlue () |
static constexpr Color | DarkCyan () |
static constexpr Color | DarkGoldenrod () |
static constexpr Color | DarkGray () |
static constexpr Color | DarkGreen () |
static constexpr Color | DarkGrey () |
static constexpr Color | DarkKhaki () |
static constexpr Color | DarkMagenta () |
static constexpr Color | DarkOliveGreen () |
static constexpr Color | DarkOrange () |
static constexpr Color | DarkOrchid () |
static constexpr Color | DarkRed () |
static constexpr Color | DarkSalmon () |
static constexpr Color | DarkSeagreen () |
static constexpr Color | DarkSlateBlue () |
static constexpr Color | DarkSlateGray () |
static constexpr Color | DarkSlateGrey () |
static constexpr Color | DarkTurquoise () |
static constexpr Color | DarkViolet () |
static constexpr Color | DeepPink () |
static constexpr Color | DeepSkyBlue () |
static constexpr Color | DimGray () |
static constexpr Color | DimGrey () |
static constexpr Color | DodgerBlue () |
static constexpr Color | Firebrick () |
static constexpr Color | FloralWhite () |
static constexpr Color | ForestGreen () |
static constexpr Color | Fuchsia () |
static constexpr Color | Gainsboro () |
static constexpr Color | Ghostwhite () |
static constexpr Color | Gold () |
static constexpr Color | Goldenrod () |
static constexpr Color | Gray () |
static constexpr Color | GreenYellow () |
static constexpr Color | Grey () |
static constexpr Color | Honeydew () |
static constexpr Color | HotPink () |
static constexpr Color | IndianRed () |
static constexpr Color | Indigo () |
static constexpr Color | Ivory () |
static constexpr Color | Khaki () |
static constexpr Color | Lavender () |
static constexpr Color | LavenderBlush () |
static constexpr Color | LawnGreen () |
static constexpr Color | LemonChiffon () |
static constexpr Color | LightBlue () |
static constexpr Color | LightCoral () |
static constexpr Color | LightCyan () |
static constexpr Color | LightGoldenrodYellow () |
static constexpr Color | LightGray () |
static constexpr Color | LightGreen () |
static constexpr Color | LightGrey () |
static constexpr Color | LightPink () |
static constexpr Color | LightSalmon () |
static constexpr Color | LightSeaGreen () |
static constexpr Color | LightSkyBlue () |
static constexpr Color | LightSlateGray () |
static constexpr Color | LightSlateGrey () |
static constexpr Color | LightSteelBlue () |
static constexpr Color | LightYellow () |
static constexpr Color | Lime () |
static constexpr Color | LimeGreen () |
static constexpr Color | Linen () |
static constexpr Color | Magenta () |
static constexpr Color | Maroon () |
static constexpr Color | MediumAquamarine () |
static constexpr Color | MediumBlue () |
static constexpr Color | MediumOrchid () |
static constexpr Color | MediumPurple () |
static constexpr Color | MediumSeagreen () |
static constexpr Color | MediumSlateBlue () |
static constexpr Color | MediumSpringGreen () |
static constexpr Color | MediumTurquoise () |
static constexpr Color | MediumVioletRed () |
static constexpr Color | MidnightBlue () |
static constexpr Color | MintCream () |
static constexpr Color | MistyRose () |
static constexpr Color | Moccasin () |
static constexpr Color | NavajoWhite () |
static constexpr Color | Navy () |
static constexpr Color | OldLace () |
static constexpr Color | Olive () |
static constexpr Color | OliveDrab () |
static constexpr Color | Orange () |
static constexpr Color | OrangeRed () |
static constexpr Color | Orchid () |
static constexpr Color | PaleGoldenrod () |
static constexpr Color | PaleGreen () |
static constexpr Color | PaleTurquoise () |
static constexpr Color | PaleVioletRed () |
static constexpr Color | PapayaWhip () |
static constexpr Color | Peachpuff () |
static constexpr Color | Peru () |
static constexpr Color | Pink () |
static constexpr Color | Plum () |
static constexpr Color | PowderBlue () |
static constexpr Color | Purple () |
static constexpr Color | RosyBrown () |
static constexpr Color | RoyalBlue () |
static constexpr Color | SaddleBrown () |
static constexpr Color | Salmon () |
static constexpr Color | SandyBrown () |
static constexpr Color | Seagreen () |
static constexpr Color | Seashell () |
static constexpr Color | Sienna () |
static constexpr Color | Silver () |
static constexpr Color | SkyBlue () |
static constexpr Color | SlateBlue () |
static constexpr Color | SlateGray () |
static constexpr Color | SlateGrey () |
static constexpr Color | Snow () |
static constexpr Color | SpringGreen () |
static constexpr Color | SteelBlue () |
static constexpr Color | Tan () |
static constexpr Color | Teal () |
static constexpr Color | Thistle () |
static constexpr Color | Tomato () |
static constexpr Color | Turquoise () |
static constexpr Color | Violet () |
static constexpr Color | Wheat () |
static constexpr Color | Whitesmoke () |
static constexpr Color | Yellow () |
static constexpr Color | YellowGreen () |
static Color | Random () |
Public Attributes | |
Scalar | red = 0.0 |
Scalar | green = 0.0 |
Scalar | blue = 0.0 |
Scalar | alpha = 0.0 |
|
explicit |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Color impeller::Color::ApplyColorMatrix | ( | const ColorMatrix & | color_matrix | ) | const |
A color filter that transforms colors through a 4x5 color matrix.
This filter can be used to change the saturation of pixels, convert from YUV to RGB, etc. Each channel of the output color is clamped to the 0 to 1 range.
ColorMatrix
Definition at line 378 of file color.cc.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Blends an unpremultiplied destination color into a given unpremultiplied source color to form a new unpremultiplied color.
If either the source or destination are premultiplied, the result will be incorrect.
Definition at line 234 of file color.cc.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Color impeller::Color::LinearToSRGB | ( | ) | const |
Convert the color from linear space to sRGB space.
The color is assumed to be unpremultiplied. If the color is premultipled, the conversion output will be incorrect.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
Definition at line 169 of file color.h.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestatic |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Color impeller::Color::SRGBToLinear | ( | ) | const |
Convert the color from sRGB space to linear space.
The color is assumed to be unpremultiplied. If the color is premultipled, the conversion output will be incorrect.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
Convert to ARGB 32 bit color.
Definition at line 261 of file color.h.
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Scalar impeller::Color::alpha = 0.0 |
Scalar impeller::Color::blue = 0.0 |
Scalar impeller::Color::green = 0.0 |
Scalar impeller::Color::red = 0.0 |