#include <dl_color.h>
Definition at line 12 of file dl_color.h.
◆ DlColor() [1/2]
constexpr flutter::DlColor::DlColor |
( |
| ) |
|
|
inlineconstexpr |
◆ DlColor() [2/2]
constexpr flutter::DlColor::DlColor |
( |
uint32_t |
argb | ) |
|
|
inlineexplicitconstexpr |
Definition at line 15 of file dl_color.h.
constexpr uint32_t argb() const
◆ argb()
constexpr uint32_t flutter::DlColor::argb |
( |
| ) |
const |
|
inlineconstexpr |
◆ getAlpha()
constexpr int flutter::DlColor::getAlpha |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 38 of file dl_color.h.
38{ return argb_ >> 24; }
◆ getAlphaF()
constexpr float flutter::DlColor::getAlphaF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 43 of file dl_color.h.
constexpr int getAlpha() const
◆ getBlue()
constexpr int flutter::DlColor::getBlue |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 41 of file dl_color.h.
41{ return argb_ & 0xFF; }
◆ getBlueF()
constexpr float flutter::DlColor::getBlueF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 46 of file dl_color.h.
constexpr int getBlue() const
◆ getGreen()
constexpr int flutter::DlColor::getGreen |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 40 of file dl_color.h.
40{ return (argb_ >> 8) & 0xFF; }
◆ getGreenF()
constexpr float flutter::DlColor::getGreenF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 45 of file dl_color.h.
constexpr int getGreen() const
◆ getRed()
constexpr int flutter::DlColor::getRed |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 39 of file dl_color.h.
39{ return (argb_ >> 16) & 0xFF; }
◆ getRedF()
constexpr float flutter::DlColor::getRedF |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 44 of file dl_color.h.
constexpr int getRed() const
◆ isOpaque()
constexpr bool flutter::DlColor::isOpaque |
( |
| ) |
const |
|
inlineconstexpr |
◆ isTransparent()
constexpr bool flutter::DlColor::isTransparent |
( |
| ) |
const |
|
inlineconstexpr |
◆ kBlack()
static constexpr DlColor flutter::DlColor::kBlack |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kBlue()
static constexpr DlColor flutter::DlColor::kBlue |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kCyan()
static constexpr DlColor flutter::DlColor::kCyan |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kDarkGrey()
static constexpr DlColor flutter::DlColor::kDarkGrey |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kGreen()
static constexpr DlColor flutter::DlColor::kGreen |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kLightGrey()
static constexpr DlColor flutter::DlColor::kLightGrey |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kMagenta()
static constexpr DlColor flutter::DlColor::kMagenta |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kMidGrey()
static constexpr DlColor flutter::DlColor::kMidGrey |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kRed()
static constexpr DlColor flutter::DlColor::kRed |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kTransparent()
static constexpr DlColor flutter::DlColor::kTransparent |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kWhite()
static constexpr DlColor flutter::DlColor::kWhite |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ kYellow()
static constexpr DlColor flutter::DlColor::kYellow |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ modulateOpacity()
constexpr DlColor flutter::DlColor::modulateOpacity |
( |
float |
opacity | ) |
const |
|
inlineconstexpr |
Definition at line 72 of file dl_color.h.
72 {
74 : opacity >= 1 ? *this
76 }
static void round(SkPoint *p)
constexpr DlColor withAlpha(uint8_t alpha) const
◆ operator!=() [1/2]
bool flutter::DlColor::operator!= |
( |
DlColor const & |
other | ) |
const |
|
inline |
Definition at line 81 of file dl_color.h.
81{ return argb_ != other.argb_; }
◆ operator!=() [2/2]
bool flutter::DlColor::operator!= |
( |
uint32_t const & |
other | ) |
const |
|
inline |
Definition at line 83 of file dl_color.h.
83{ return argb_ != other; }
◆ operator==() [1/2]
bool flutter::DlColor::operator== |
( |
DlColor const & |
other | ) |
const |
|
inline |
Definition at line 80 of file dl_color.h.
80{ return argb_ == other.argb_; }
◆ operator==() [2/2]
bool flutter::DlColor::operator== |
( |
uint32_t const & |
other | ) |
const |
|
inline |
Definition at line 82 of file dl_color.h.
82{ return argb_ == other; }
◆ premultipliedArgb()
constexpr uint32_t flutter::DlColor::premultipliedArgb |
( |
| ) |
const |
|
inlineconstexpr |
Definition at line 48 of file dl_color.h.
48 {
50 return argb_;
51 }
53 return (argb_ & 0xFF000000) |
57 }
constexpr float getAlphaF() const
constexpr float getRedF() const
constexpr float getBlueF() const
constexpr float getGreenF() const
constexpr bool isOpaque() const
◆ toAlpha()
static constexpr uint8_t flutter::DlColor::toAlpha |
( |
SkScalar |
opacity | ) |
|
|
inlinestaticconstexpr |
Definition at line 17 of file dl_color.h.
17{ return toC(opacity); }
◆ toOpacity()
static constexpr SkScalar flutter::DlColor::toOpacity |
( |
uint8_t |
alpha | ) |
|
|
inlinestaticconstexpr |
◆ withAlpha()
constexpr DlColor flutter::DlColor::withAlpha |
( |
uint8_t |
alpha | ) |
const |
|
inlineconstexpr |
Definition at line 59 of file dl_color.h.
59 {
60 return DlColor((argb_ & 0x00FFFFFF) | (alpha << 24));
61 }
◆ withBlue()
constexpr DlColor flutter::DlColor::withBlue |
( |
uint8_t |
blue | ) |
const |
|
inlineconstexpr |
Definition at line 68 of file dl_color.h.
68 {
69 return DlColor((argb_ & 0xFFFFFF00) | (blue << 0));
70 }
◆ withGreen()
constexpr DlColor flutter::DlColor::withGreen |
( |
uint8_t |
green | ) |
const |
|
inlineconstexpr |
Definition at line 65 of file dl_color.h.
65 {
66 return DlColor((argb_ & 0xFFFF00FF) | (green << 8));
67 }
◆ withRed()
constexpr DlColor flutter::DlColor::withRed |
( |
uint8_t |
red | ) |
const |
|
inlineconstexpr |
Definition at line 62 of file dl_color.h.
62 {
63 return DlColor((argb_ & 0xFF00FFFF) | (red << 16));
64 }
The documentation for this struct was generated from the following file: