Top Level Namespace

Defined in:

Method Summary

Method Detail

def color(r : Number, g : Number, b : Number, a : Number = Glint::Color::MAXIMUM_VALUE) #

Creates a Color.

# Example:
red = color(255, 0, 0)

[View source]
def color(c : Raylib::Color) #

Creates a Glint::Color from a Raylib::Color.

# Example:
red1 = color(Raylib::Color.new r: 255, g: 0, b: 0, a: 255)
red2 = color(Raylib::RED)

[View source]
def color(hex : String) #

Creates a Color from a hex string.

# Example:
red1 = color("#ff0000")
red2 = color("#FF0000FF")
red3 = color("FF0000")

[View source]
def color(value : Number) #

Creates a Color from a value.

# Example:
red = color(0xFF000000)

[View source]
def color(values : Tuple(Int32, Int32, Int32) | Tuple(Int32, Int32, Int32, Int32)) #

Creates a Color from a tuple.

# Example:
red = color({255, 0, 0})

[View source]
def p(x, y) #

Creates a Glint::Position from x and y coordinates.


[View source]
def p(v : Glint::Vector2) #

Creates a Position from a Glint::Vector2.


[View source]
def rect(r : Raylib::Rectangle) #

Creates a Rect from a Raylib::Rectangle.


[View source]
def rect(x : Number = 0, y : Number = 0, width : Number = 0, height : Number = 0) #

Creates a Rect from x and y coordinates and a width and a height.

# Example
my_rect = rect(250, 350, Dimension.new(100, 200))

[View source]
def rect(x : Number = 0, y : Number = 0, size : Dimension = Dimension.new(0, 0)) #

Creates a Rect from x and y coordinates and a size.

# Example
my_rect = rect(250, 350, Dimension.new(100, 200))

[View source]
def rect(r : Rect) #

Creates a Rect from another Rect.

# Example
my_rect = rect(250, 350, Dimension.new(100, 200))
other_rect = rect(my_rect)

[View source]
def rect(position : Position = Position.new(0, 0), width : Number = 0, height : Number = 0) #

Creates a Rect from a position, a width and a height.

# Example
my_rect = rect(Position.new(250, 350), 100, 200)

[View source]
def rect(position : Position = Position.new(0, 0), size : Dimension = Dimension.new(0, 0)) #

Creates a Rect from a position and a size.

# Example
my_rect = rect(Position.new(250, 350), Dimension.new(100, 200))

[View source]
def size(x, y) #

Creates a Dimension from x and y coordinates.


[View source]
def size(v : Glint::Vector2) #

Creates a Dimension from a Vector2.


[View source]
def vec(v : Raylib::Vector2) #

Creates a Glint::Vector2 from a Raylib::Vector2.


[View source]
def vec(x : Number = 0, y : Number = 0) #

Creates a Glint::Vector2 from x/y coordinates.


[View source]
def vec(v : Glint::Vector2) #

Creates a Glint::Vector2 from another Glint::Vector2.


[View source]
def vel(x : Number, y : Number) #

Creates a new Glint::Velocity x/y coordinates.


[View source]
def vel(v : Glint::Vector2) #

Creates a new Glint::Velocity from a Glint::Vector2.


[View source]