class DFL::PalGraphic

Overview

A DFL::Head's palgraphic data

Included Modules

Defined in:

D_File/dfl/palgraphic.cr
write.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module WritingMethods::DFL::PalGraphic

write(io : IO) write

Constructor Detail

def self.from_graphic(graphic : Graphic, palette : Palette) : PalGraphic #

Converts a graphic to a palgraphic

NOTE If you get an arithmetic overflow error at any point, chances are that your image is too big


[View source]
def self.from_image(image : Raylib::Image, palette : Palette) : PalGraphic #

Converts a Raylib::Image to a palgraphic

NOTE If you get an arithmetic overflow error at any point, chances are that your image is too big


[View source]
def self.read(io : IO) : PalGraphic #

Reads in a dfl palgraphic given the io


[View source]

Class Method Detail

def self.color_distance(color1 : Color, color2 : Color) : Int #

Gets the absolute Color Distance between color1 to color2


[View source]

Instance Method Detail

def data : Array(UInt64 | UInt32 | UInt16 | UInt8 | Nil) #

The image data


[View source]
def data=(data : Array(UInt64 | UInt32 | UInt16 | UInt8 | Nil)) #

The image data


[View source]
def height : UInt32 #

The height of the image


[View source]
def height=(height : UInt32) #

The height of the image


[View source]
def to_graphic(palette : Palette) : Graphic #

Converts a palgraphic to a graphic


[View source]
def to_image(palette : Palette) : Raylib::Image #

Converts a palgraphic to a Raylib::Image


[View source]
def width : UInt32 #

The width of the image


[View source]
def width=(width : UInt32) #

The width of the image


[View source]