/foundation/graphic/graphic_2d/rosen/modules/render_service_base/src/common/ |
H A D | rs_color.cpp | 29 red_ = static_cast<int16_t>((rgba & 0xFF000000) >> 24); // 0xff000000 red mask, 24 red shift 39 red_ = red; 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 in operator -() 128 uint8_t red_ : 8; FromBgraInt() member [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_() 35 red_ = (rgba >> 16) & 0xff; 42 return red_; in GetRed() 62 red_ = r; in SetRed() 82 return static_cast<scalar>(red_) / RGB_MAX; in GetRedF() 111 red_ = static_cast<uint8_t>(std::clamp(r, 0.0f, 1.0f) * RGB_MAX); in SetRedF() 132 red_ = r; in SetRgb() 140 red_ 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 ==() 70 return red_; in GetRed() 88 red_ = (rgba >> SIXTEEN) & 0xff; in Color() 97 (static_cast<uint32_t>((std::clamp<int16_t>(red_, 0, UINT8_MAX)) << 16)) | in GetValue() 114 uint32_t red_; member in OHOS::Ace::Testing::TestingColor
|
/foundation/arkui/ace_engine/frameworks/core/components/common/properties/ |
H A D | color.h | 200 red_ = static_cast<int16_t>((argb & 0x00FF0000) >> 16); 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 ==() 247 return red_; in GetRed() 269 (static_cast<uint32_t>((std::clamp<int16_t>(red_, 0, UINT8_MAX)) << 16)) | in GetValue() 278 static_cast<uint8_t>(std::clamp<int16_t>(red_, 0, UINT8_MAX)), in BlendOpacity() 287 static_cast<uint8_t>(std::clamp<int16_t>(red_, 0, UINT8_MAX)), in ToColor() 294 int16_t red_; 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) {} 76 int16_t red_ : 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() 156 uint32_t red_; 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() 527 color.red = red_; 537 uint16_t red_; member in OHOS::TestBtnOnClickChangeColorListener
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/ |
H A D | jsXNode.js | 1601 this.red_ = ColorMetrics.clamp(red); 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})`; 1735 return this.red_;
|