Rectangle
Rectangle shape
Operations
- AddX
- AddY
- GetBottom
- GetCenterX
- GetColor
- GetFill
- GetHeight
- GetLeft
- GetPosition
- GetRight
- GetTop
- GetWidth
- Render
- Set
- SetBottom
- SetCenter
- SetCenterX
- SetCenterY
- SetColor
- SetFill
- SetLeft
- SetPostion
- SetRight
- SetTop
AddX
Increments the current x-position
method : public : AddX(x:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | increment to the current x-position |
AddY
Increments the current y-position
method : public : AddY(y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y | Int | increment to the current y-position |
GetBottom
Gets bottom position
method : public : GetBottom() ~ Int
Return
Type | Description |
---|---|
Int | bottom position |
GetCenterX
Gets the center x-position
method : public : GetCenterX() ~ Int
Return
Type | Description |
---|---|
Int | center x-position |
GetFill
Sets color fill
method : public : GetFill() ~ Bool
Return
Type | Description |
---|---|
Bool | if true, color fills rectangle; false otherwise |
GetPosition
Gets sprite position
method : public : GetPosition() ~ Position
Return
Type | Description |
---|---|
Position | sprite position |
Render
Renders an image
method : public : Render(x:Int, y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | x-position |
y | Int | y-position |
Set
Sets left upper position
method : public : Set(x:Int, y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | x-position |
y | Int | y-position |
Set
Sets position
method : public : Set(v2:Vector2) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
v2 | Vector2 | vector position |
SetBottom
Sets bottom position
method : public : SetBottom(y2:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y2 | Int | bottom position |
SetCenter
Sets center position
method : public : SetCenter(x:Int, y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | x-position |
y | Int | y-position |
SetCenterX
Sets center y-position
method : public : SetCenterX(x:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | center y-position |
SetCenterY
Sets center y-position
method : public : SetCenterY(y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y | Int | center y-position |
SetColor
Sets rectangle color
method : public : SetColor(color:Color) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
color | Color | color |
SetFill
Sets color fill
method : public : SetFill(fill:Bool) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
fill | Bool | if true, color fills rectangle; false otherwise |
SetLeft
Sets left position
method : public : SetLeft(x:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | left position |
SetPostion
Sets the current x-position
method : public : SetPostion(position:Position) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
position | Position | new position |
SetRight
Sets right position
method : public : SetRight(x2:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x2 | Int | right position |
SetTop
Sets top position
method : public : SetTop(y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y | Int | top position |