struct Blend2D::Styling::RGBA64

Defined in:

blend2d/styling/color.cr

Constant Summary

BLACK = RGBA64.new(65535, 65535, 65535, 65535)
BLUE = RGBA64.new(0, 0, 65535, 65535)
GREEN = RGBA64.new(0, 65535, 0, 65535)
RED = RGBA64.new(65535, 0, 0, 65535)
WHITE = RGBA64.new(65535, 65535, 65535, 65535)

Constructors

Instance Method Summary

Constructor Detail

def self.new(r : UInt16, g : UInt16, b : UInt16, a : UInt16) #

Initialize the color with four 16-bit unsigned integers representing red, green, blue, and alpha.


[View source]
def self.new(packed : UInt64) #

Initialize the color with a 64-bit unsigned integer representing red, green, blue, and alpha.


[View source]

Instance Method Detail

def a : UInt16 #

[View source]
def b : UInt16 #

[View source]
def g : UInt16 #

[View source]
def opaque #

Initialize the color with full alpha.


[View source]
def r : UInt16 #

[View source]
def raw : UInt64 #

Pack the integers into a 64-bit unsigned integer.


[View source]
def to_rgba32 #

Convert the RGBA64 to an RGBA32 by downscaling each integer to 8 bits.


[View source]
def transparent #

Initialize the color with zero alpha.


[View source]
def with_alpha(alpha : UInt16) #

Initialize the color with the same red, green, and blue values, but with the specified alpha value.


[View source]