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) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | increment to the current x-position |
AddY
Increments the current y-position
method : public : AddY(y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| y | Int | increment to the current y-position |
GetBottom
Gets bottom position
method : public : GetBottom() ~ IntReturn
| Type | Description |
|---|---|
| Int | bottom position |
GetCenterX
Gets the center x-position
method : public : GetCenterX() ~ IntReturn
| Type | Description |
|---|---|
| Int | center x-position |
GetFill
Sets color fill
method : public : GetFill() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | if true, color fills rectangle; false otherwise |
GetPosition
Gets sprite position
method : public : GetPosition() ~ PositionReturn
| Type | Description |
|---|---|
| Position | sprite position |
Render
Renders an image
method : public : Render(x:Int, y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | x-position |
| y | Int | y-position |
Set
Sets left upper position
method : public : Set(x:Int, y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | x-position |
| y | Int | y-position |
Set
Sets position
method : public : Set(v2:Vector2) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| v2 | Vector2 | vector position |
SetBottom
Sets bottom position
method : public : SetBottom(y2:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| y2 | Int | bottom position |
SetCenter
Sets center position
method : public : SetCenter(x:Int, y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | x-position |
| y | Int | y-position |
SetCenterX
Sets center y-position
method : public : SetCenterX(x:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | center y-position |
SetCenterY
Sets center y-position
method : public : SetCenterY(y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| y | Int | center y-position |
SetColor
Sets rectangle color
method : public : SetColor(color:Color) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| color | Color | color |
SetFill
Sets color fill
method : public : SetFill(fill:Bool) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| fill | Bool | if true, color fills rectangle; false otherwise |
SetLeft
Sets left position
method : public : SetLeft(x:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x | Int | left position |
SetPostion
Sets the current x-position
method : public : SetPostion(position:Position) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| position | Position | new position |
SetRight
Sets right position
method : public : SetRight(x2:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| x2 | Int | right position |
SetTop
Sets top position
method : public : SetTop(y:Int) ~ NilParameters
| Name | Type | Description |
|---|---|---|
| y | Int | top position |