Home

Rectangle

Rectangle shape

Implements: Shape

Operations

AddX

Increments the current x-position

method : public : AddX(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntincrement to the current x-position

AddY

Increments the current y-position

method : public : AddY(y:Int) ~ Nil
Parameters
NameTypeDescription
yIntincrement to the current y-position

GetBottom

Gets bottom position

method : public : GetBottom() ~ Int
Return
TypeDescription
Intbottom position

GetCenterX

Gets the center x-position

method : public : GetCenterX() ~ Int
Return
TypeDescription
Intcenter x-position

GetColor

Gets rectangle color

method : public : GetColor() ~ Color
Return
TypeDescription
Colorcolor

GetFill

Sets color fill

method : public : GetFill() ~ Bool
Return
TypeDescription
Boolif true, color fills rectangle; false otherwise

GetHeight

Gets sprite height

method : public : GetHeight() ~ Int
Return
TypeDescription
Intsprite height

GetLeft

Gets left position

method : public : GetLeft() ~ Int
Return
TypeDescription
Intleft position

GetPosition

Gets sprite position

method : public : GetPosition() ~ Position
Return
TypeDescription
Positionsprite position

GetRight

Gets right position

method : public : GetRight() ~ Int
Return
TypeDescription
Intright position

GetTop

Gets top position

method : public : GetTop() ~ Int
Return
TypeDescription
Inttop position

GetWidth

Gets sprite width

method : public : GetWidth() ~ Int
Return
TypeDescription
Intsprite width

Render

Renders an image based upon position instance

method : public : Render() ~ Nil

Renders an image

method : public : Render(x:Int, y:Int) ~ Nil
Parameters
NameTypeDescription
xIntx-position
yInty-position

Set

Sets left upper position

method : public : Set(x:Int, y:Int) ~ Nil
Parameters
NameTypeDescription
xIntx-position
yInty-position

Sets position

method : public : Set(v2:Vector2) ~ Nil
Parameters
NameTypeDescription
v2Vector2vector position

SetBottom

Sets bottom position

method : public : SetBottom(y2:Int) ~ Nil
Parameters
NameTypeDescription
y2Intbottom position

SetCenter

Sets center position

method : public : SetCenter(x:Int, y:Int) ~ Nil
Parameters
NameTypeDescription
xIntx-position
yInty-position

SetCenterX

Sets center y-position

method : public : SetCenterX(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntcenter y-position

SetCenterY

Sets center y-position

method : public : SetCenterY(y:Int) ~ Nil
Parameters
NameTypeDescription
yIntcenter y-position

SetColor

Sets rectangle color

method : public : SetColor(color:Color) ~ Nil
Parameters
NameTypeDescription
colorColorcolor

SetFill

Sets color fill

method : public : SetFill(fill:Bool) ~ Nil
Parameters
NameTypeDescription
fillBoolif true, color fills rectangle; false otherwise

SetLeft

Sets left position

method : public : SetLeft(x:Int) ~ Nil
Parameters
NameTypeDescription
xIntleft position

SetPostion

Sets the current x-position

method : public : SetPostion(position:Position) ~ Nil
Parameters
NameTypeDescription
positionPositionnew position

SetRight

Sets right position

method : public : SetRight(x2:Int) ~ Nil
Parameters
NameTypeDescription
x2Intright position

SetTop

Sets top position

method : public : SetTop(y:Int) ~ Nil
Parameters
NameTypeDescription
yInttop position