class

Pixie::Pixel

Inherits Reference / Object

Constants

BLACK = Pixel.from_rgb(0, 0, 0)
BLUE = Pixel.from_rgb(0, 0, 255)
BROWN = Pixel.from_rgb(165, 42, 42)
COLOR_HEX_REGEX = /^#([A-Fa-f0-9]{9}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/
CYAN = Pixel.from_rgb(0, 255, 255)
GRAY = Pixel.from_rgb(128, 128, 128)
GREEN = Pixel.from_rgb(0, 255, 0)
MAGENTA = Pixel.from_rgb(255, 0, 255)
ORANGE = Pixel.from_rgb(255, 165, 0)
PINK = Pixel.from_rgb(255, 192, 203)
PURPLE = Pixel.from_rgb(128, 0, 128)
RED = Pixel.from_rgb(255, 0, 0)
TRANSPARENT = Pixel.from_rgb(0, 0, 0, 0)
WHITE = Pixel.from_rgb(255, 255, 255)
YELLOW = Pixel.from_rgb(255, 255, 0)

Constructors

new(pixel_wand : Pointer(LibMagick::PixelWand))
Source

Class methods

from_cmyk(cyan : Int, magenta : Int, yellow : Int, key : Int)
Source
from_hex(color : String)
Source
from_rgb(red : Int, green : Int, blue : Int, alpha : Int = 1)
Source
parse(string : String)
Source

Instance methods

<=>(other : Pixel)
Source
==(other : Pixel)
Source
alpha
Source
alpha=(val : Float)
Source
alpha_quantum
Source
alpha_quantum=(val : Float)
Source
black
Source
black=(val : Float)
Source
black_quantum
Source
black_quantum=(val : Float)
Source
blue
Source
blue=(val : Float)
Source
blue_quantum
Source
blue_quantum=(val : Float)
Source
clear
Source
clone
Source
cyan
Source
cyan=(val : Float)
Source
cyan_quantum
Source
cyan_quantum=(val : Float)
Source
fuzz
Source
fuzz=(val : Float)
Source
green
Source
green=(val : Float)
Source
green_quantum
Source
green_quantum=(val : Float)
Source
index
Source
info
Source
inspect

Returns an unambiguous and information-rich string representation of this object, typically intended for developers.

This method should usually not be overridden. It delegates to #inspect(IO) which can be overridden for custom implementations.

Also see #to_s.

Source
magenta
Source
magenta=(val : Float)
Source
magenta_quantum
Source
magenta_quantum=(val : Float)
Source
normalized_string
Source
quantum_packet
Source
quantum_pixel(image : Image)
Source
red=(val : Float)
Source
red_quantum
Source
red_quantum=(val : Float)
Source
set_cmyk(cyan : Int, magenta : Int, yellow : Int, key : Int)
Source
set_color(color : String)
Source
set_hsl(hue : Int, saturation : Int, lightness : Int)
Source
set_rgb(red : Int, green : Int, blue : Int, alpha : Int | Nil = nil)
Source
similar?(other : Pixel, fuzz : Float)
Source
size
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
to_unsafe
Source
yellow
Source
yellow=(val : Float)
Source
yellow_quantum
Source
yellow_quantum=(val : Float)
Source

Macros

finalize
Source