struct PNG::RGBA(T)

Defined in:

png/colors/rgba.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from struct PNG::Color(T, 4)

==(other) ==, [](*args, **options)
[](*args, **options, &)
[]
, []=(*args, **options) []=, bytesize bytesize, channels : StaticArray(T, N) channels, channels=(channels : StaticArray(T, N)) channels=, each(*args, **options)
each(*args, **options, &)
each
, num_channels num_channels, size(*args, **options)
size(*args, **options, &)
size
, to_bytes to_bytes, to_slice to_slice, unsafe_fetch(*args, **options)
unsafe_fetch(*args, **options, &)
unsafe_fetch
, unsafe_put(*args, **options)
unsafe_put(*args, **options, &)
unsafe_put

Constructor methods inherited from struct PNG::Color(T, 4)

new(channels : StaticArray(T, N)) new

Constructor Detail

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

[View source]
def self.new(r : T, g : T, b : T) #

[View source]
def self.new(channels : StaticArray(T, N)) #

[View source]

Class Method Detail

def self.[](r : T, g : T, b : T, a : T) #

[View source]
def self.color_type #

[View source]

Instance Method Detail

def a #

[View source]
def a=(value : T) #

[View source]
def b #

[View source]
def b=(value : T) #

[View source]
def dist(other) #

Get the Euclidean distance between self and other


[View source]
def g #

[View source]
def g=(value : T) #

[View source]
def r #

[View source]
def r=(value : T) #

[View source]
def to_g8 #

via luminosity method


[View source]
def to_rgb8 #

[View source]
def to_s(io : IO) #
Description copied from struct Struct

Same as #inspect(io).


[View source]
def to_u16 #

[View source]
def to_u32 #

[View source]
def to_u8 #

[View source]