struct Blend2D::Styling::RGBA32
- Blend2D::Styling::RGBA32
- Struct
- Value
- Object
Defined in:
blend2d/styling/color.crConstant Summary
-
BLACK =
RGBA32.new(255, 255, 255, 255)
-
BLUE =
RGBA32.new(0, 0, 255, 255)
-
GREEN =
RGBA32.new(0, 255, 0, 255)
-
RED =
RGBA32.new(255, 0, 0, 255)
-
WHITE =
RGBA32.new(255, 255, 255, 255)
Constructors
-
.new(r : UInt8, g : UInt8, b : UInt8, a : UInt8)
Initialize the color with four 8-bit unsigned integers representing red, green, blue, and alpha.
-
.new(packed : UInt32)
Initialize the color with a 32-bit unsigned integer representing red, green, blue, and alpha.
Instance Method Summary
- #a : UInt8
- #b : UInt8
- #g : UInt8
-
#opaque
Initialize the color with full alpha.
- #r : UInt8
-
#raw : UInt32
Pack the integers into a 32-bit unsigned integer.
- #to_rgba64 : RGBA64
-
#transparent
Initialize the color with zero alpha.
-
#with_alpha(alpha : UInt8)
Initialize the color with the same red, green, and blue values, but with the specified alpha value.
Constructor Detail
def self.new(r : UInt8, g : UInt8, b : UInt8, a : UInt8)
#
Initialize the color with four 8-bit unsigned integers representing red, green, blue, and alpha.
def self.new(packed : UInt32)
#
Initialize the color with a 32-bit unsigned integer representing red, green, blue, and alpha.
Instance Method Detail
def with_alpha(alpha : UInt8)
#
Initialize the color with the same red, green, and blue values, but with the specified alpha value.