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