class Glint::Shape::Rectangle
- Glint::Shape::Rectangle
- Glint::Shape::Shape
- Glint::GameObject
- Reference
- Object
Defined in:
glint/game_object/shape/rectangle.crClass Method Summary
-
.draw(position : Position, size : Dimension, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
Draw a
Rectangle
. -
.draw(position : Position, width : Number, height : Number, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
Draw a
Rectangle
with a width/height. -
.draw(x : Number, y : Number, size : Dimension, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
Draw a
Rectangle
at x/y coordinates. -
.draw(x : Number, y : Number, width : Number, height : Number, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
Draw a
Rectangle
at x/y coordinates with a width/height. - .draw(rect : Rect, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
-
.fill(position : Position, size : Dimension, fill_color : Color | Nil = nil)
Draw a filled rectangle.
-
.outline(position : Position, size : Dimension, outline : Float32, outline_color : Color, outline_position = OutlinePosition::Centered)
Draw an outlined rectangle.
Instance Method Summary
-
#draw
Draw the
Rectangle
. -
#size : Dimension
The size of the
Rectangle
. -
#size=(size : Dimension)
The size of the
Rectangle
.
Instance methods inherited from class Glint::Shape::Shape
fill_color : Glint::Color?
fill_color,
fill_color=(color : Color)
fill_color=,
outline : Float32
outline,
outline=(width : Number)
outline=,
outline_color : Glint::Color?
outline_color,
outline_color=(color : Color)
outline_color=,
outline_position : Glint::Shape::OutlinePosition
outline_position,
outline_position=(position : OutlinePosition)
outline_position=
Instance methods inherited from class Glint::GameObject
<<(other : GameObject)
<<,
can_update?
can_update?,
children : Array(GameObject)
children,
delete(other : GameObject)
delete,
draw
draw,
draw_above_children : Bool
draw_above_children,
draw_above_children=(draw_above_children : Bool)
draw_above_children=,
draw_at(position)
draw_at,
draw_children : Bool
draw_children,
draw_children=(draw_children : Bool)
draw_children=,
draw_position : DrawPosition
draw_position,
draw_position=(draw_position : DrawPosition)
draw_position=,
extents : Dimension
extents,
game : Game | Nil
game,
game=(game : Game | Nil)
game=,
has?(other : GameObject)
has?,
parent : GameObject | Game | Nil
parent,
parent=(parent : GameObject | Game | Nil)
parent=,
pivot : Origin
pivot,
pivot=(pivot : Origin)
pivot=,
position : Glint::Vector2
position,
position=(position : Glint::Vector2)
position=,
rotation : Float64
rotation,
rotation=(rotation : Float64)
rotation=,
update(delta)update(delta, &) update, update_mode : UpdateMode update_mode, update_mode=(update_mode : UpdateMode) update_mode=, visible : Bool visible, visible=(visible : Bool) visible=
Class Method Detail
def self.draw(position : Position, size : Dimension, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
#
Draw a Rectangle
.
def self.draw(position : Position, width : Number, height : Number, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
#
Draw a Rectangle
with a width/height.
def self.draw(x : Number, y : Number, size : Dimension, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
#
Draw a Rectangle
at x/y coordinates.
def self.draw(x : Number, y : Number, width : Number, height : Number, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
#
Draw a Rectangle
at x/y coordinates with a width/height.
def self.draw(rect : Rect, fill_color : Color | Nil = nil, outline : Float32 = 0, outline_color : Color | Nil = nil, outline_position = OutlinePosition::Centered)
#
Draw a filled rectangle.
def self.outline(position : Position, size : Dimension, outline : Float32, outline_color : Color, outline_position = OutlinePosition::Centered)
#
Draw an outlined rectangle.