class Game::Rectangle

Direct Known Subclasses

Defined in:

game/shapes/rectangle.cr

Constructors

Instance Method Summary

Instance methods inherited from class Game::Shape

color : Color color, color=(color : Color) color=, draw(image : Image, parent_x = 0, parent_y = 0)
draw(parent_x = 0, parent_y = 0)
draw
, draw_filled(image : Image, parent_x = 0, parent_y = 0)
draw_filled(parent_x = 0, parent_y = 0)
draw_filled
, draw_outlined(image : Image, parent_x = 0, parent_y = 0)
draw_outlined(parent_x = 0, parent_y = 0)
draw_outlined
, filled=(filled : Bool) filled=, filled? : Bool filled?, height height, height=(_height) height=, update(_frame_time) update, width width, width=(_width) width=, x x, x=(_x) x=, y y, y=(_y) y=

Constructor methods inherited from class Game::Shape

new(color, filled : Bool = FILLED) new

Constructor Detail

def self.new(x : Float32 | Int32 = 0, y : Float32 | Int32 = 0, width : Float32 | Int32 = 1, height : Float32 | Int32 = 1, rotation : Float32 | Int32 = 0, origin : ::Game::Vector = Vector.new, color = nil, filled = Shape::FILLED) #

[View source]

Instance Method Detail

def draw_filled(parent_x = 0, parent_y = 0) #

[View source]
def draw_outlined(parent_x = 0, parent_y = 0) #

[View source]
def height : Int32 | Float32 #

[View source]
def height=(height : Int32 | Float32) #

[View source]
def origin : Vector #

[View source]
def origin=(origin : Vector) #

[View source]
def rotation : Int32 | Float32 #

[View source]
def rotation=(rotation : Int32 | Float32) #

[View source]
def width : Int32 | Float32 #

[View source]
def width=(width : Int32 | Float32) #

[View source]
def x : Int32 | Float32 #

[View source]
def x=(x : Int32 | Float32) #

[View source]
def y : Int32 | Float32 #

[View source]
def y=(y : Int32 | Float32) #

[View source]