/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/common/ |
H A D | rs_color.cpp | 30 green_ = static_cast<int16_t>((rgba & 0x00FF0000) >> 16); // 0x00ff0000 green mask, 16 green shift 40 green_ = green; 46 return red_ == rhs.red_ && green_ == rhs.green_ && blue_ == rhs.blue_ && alpha_ == rhs.alpha_; in operator ==() 51 return (std::abs(red_ - other.red_) <= threshold) && (std::abs(green_ - other.green_) <= threshold) && in IsNearEqual() 57 return RSColor(red_ + rhs.red_, green_ + rhs.green_, blue_ + rhs.blue_, alpha_ + rhs.alpha_); in operator +() 62 return RSColor(red_ - rhs.red_, green_ - rhs.green_, blue in operator -() [all...] |
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/src/drawing/draw/ |
H A D | color.cpp | 24 Color::Color() noexcept : alpha_(RGB_MAX), red_(0), green_(0), blue_(0) {} 26 Color::Color(const Color& c) noexcept : alpha_(c.GetAlpha()), red_(c.GetRed()), green_(c.GetGreen()), blue_(c.GetBlue()) in blue_() 29 Color::Color(uint32_t r, uint32_t g, uint32_t b, uint32_t a) noexcept : alpha_(a), red_(r), green_(g), blue_(b) {} in blue_() 36 green_ = (rgba >> 8) & 0xff; 47 return green_; in GetGreen() 67 green_ = g; in SetGreen() 87 return static_cast<scalar>(green_) / RGB_MAX; in GetGreenF() 116 green_ = static_cast<uint8_t>(std::clamp(g, 0.0f, 1.0f) * RGB_MAX); in SetGreenF() 133 green_ = g; in SetRgb() 141 green_ in SetRgbF() [all...] |
/foundation/arkui/ace_engine/test/mock/core/rosen/ |
H A D | testing_color.h | 50 : red_(red), green_(green), blue_(blue), alpha_(alpha) in TestingColor() 53 : red_((rgba >> SIXTEEN) & COLOR_DEFAULT), green_((rgba >> EIGHT) & COLOR_DEFAULT), in TestingColor() 60 return red_ == rhs.red_ && green_ == rhs.green_ && blue_ == rhs.blue_ && alpha_ == rhs.alpha_; in operator ==() 75 return green_; in GetGreen() 89 green_ = (rgba >> EIGHT) & 0xff; in Color() 96 (static_cast<uint32_t>((std::clamp<int16_t>(green_, 0, UINT8_MAX)) << 8)) | in GetValue() 115 uint32_t green_; member in OHOS::Ace::Testing::TestingColor
|
/foundation/arkui/ace_engine/frameworks/core/components/common/properties/ |
H A D | color.h | 201 green_ = static_cast<int16_t>((argb & 0x0000FF00) >> 8); in LinearColor() 205 : alpha_(color.GetAlpha()), red_(color.GetRed()), green_(color.GetGreen()), blue_(color.GetBlue()) in LinearColor() 208 : alpha_(alpha), red_(red), green_(green), blue_(blue) in LinearColor() 241 return alpha_ == color.GetAlpha() && red_ == color.GetRed() && green_ == color.GetGreen() && in operator ==() 252 return green_; in GetGreen() 268 (static_cast<uint32_t>((std::clamp<int16_t>(green_, 0, UINT8_MAX)) << 8)) | in GetValue() 279 static_cast<uint8_t>(std::clamp<int16_t>(green_, 0, UINT8_MAX)), in BlendOpacity() 288 static_cast<uint8_t>(std::clamp<int16_t>(green_, 0, UINT8_MAX)), in ToColor() 295 int16_t green_; member in OHOS::Ace::Color::LinearColor
|
/foundation/graphic/graphic_2d/rosen/modules/render_service_base/include/common/ |
H A D | rs_color.h | 29 RSColor() noexcept : alpha_(0), blue_(0), green_(0), red_(0) {} 75 int16_t green_ : 16; member
|
/foundation/graphic/graphic_2d/rosen/modules/2d_graphics/include/draw/ |
H A D | color.h | 146 return ((alpha_ & 0xffu) << 24) | ((red_ & 0xffu) << 16) | ((green_ & 0xffu) << 8) | ((blue_ & 0xffu) << 0); in CastToColorQuad() 157 uint32_t green_; member in OHOS::Rosen::Drawing::Color
|
/foundation/arkui/ui_lite/test/uitest/test_button/ |
H A D | ui_test_button.cpp | 517 : uiView_(uiView), red_(red), green_(green), blue_(blue) in TestBtnOnClickChangeColorListener() 528 color.green = green_; 538 uint16_t green_; member in OHOS::TestBtnOnClickChangeColorListener
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/ |
H A D | jsXNode.js | 1602 this.green_ = ColorMetrics.clamp(green); 1610 return (this.alpha_ << 24) + (this.red_ << 16) + (this.green_ << 8) + this.blue_; 1732 return `rgba(${this.red_}, ${this.green_}, ${this.blue_}, ${this.alpha_ / MAX_CHANNEL_VALUE})`; 1738 return this.green_;
|