class Novika::ColorSnapshot

Overview

Snapshot of a color form.

Its type is SnapshotType::Color.

Defined in:

novika/image.cr

Constant Summary

ENDIAN = ["big"]

Snapshot of a color form.

Its type is SnapshotType::Color.

KLASS_NAME = [Novika::ColorSnapshot]

Snapshot of a color form.

Its type is SnapshotType::Color.

PARTS = [{type: "basic", name: r, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: g, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: b, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: a, cls: UInt8, onlyif: nil, verify: nil, value: nil}] of Nil

Snapshot of a color form.

Its type is SnapshotType::Color.

REMAINING = [] of Nil

Snapshot of a color form.

Its type is SnapshotType::Color.

Constructors

Class Method Summary

Macro Summary

Instance Method Summary

Instance methods inherited from class Novika::Snapshot

to_form(assembler : BlockAssembler) to_form

Class methods inherited from class Novika::Snapshot

bit_fields bit_fields

Macros inherited from class Novika::Snapshot

novika_snapshot(name, onlyif = nil, verify = nil, value = nil) novika_snapshot

Constructor Detail

def self.new(form : Color) #

Class Method Detail

def self.bit_fields #

Snapshot of a color form.

Its type is SnapshotType::Color.


Macro Detail

macro novika_block_ref_snapshot(name, onlyif = nil, verify = nil, value = nil) #

Snapshot of a color form.

Its type is SnapshotType::Color.


macro novika_boolean_snapshot(name, onlyif = nil, verify = nil, value = nil) #

Snapshot of a color form.

Its type is SnapshotType::Color.


macro novika_color_snapshot(name, onlyif = nil, verify = nil, value = nil) #

Snapshot of a color form.

Its type is SnapshotType::Color.


macro novika_snapshot(name, onlyif = nil, verify = nil, value = nil) #

Snapshot of a color form.

Its type is SnapshotType::Color.


Instance Method Detail

def __format__ : IO::ByteFormat #

def a : UInt8 #

Holds alpha channel value, a u8 0-255.


def a=(a : UInt8) #

Holds alpha channel value, a u8 0-255.


def b : UInt8 #

Holds blue channel value, a u8 0-255.


def b=(b : UInt8) #

Holds blue channel value, a u8 0-255.


def g : UInt8 #

Holds green channel value, a u8 0-255.


def g=(g : UInt8) #

Holds green channel value, a u8 0-255.


def r : UInt8 #

Holds red channel value, a u8 0-255.


def r=(r : UInt8) #

Holds red channel value, a u8 0-255.


def to_form(assembler) #