Sprite
Bitmap sprite
Operations
- AddX
- AddY
- Free
- GetBottom
- GetCenterX
- GetCenterY
- GetHeight
- GetLeft
- GetPosition
- GetRight
- GetScale
- GetTop
- GetWidth
- Render
- Set
- SetAlpha
- SetBlendMode
- SetBottom
- SetCenter
- SetCenterX
- SetCenterY
- SetColor
- SetLeft
- SetPostion
- SetRight
- SetScale
- 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 |
GetCenterY
Gets the center y-position
method : public : GetCenterY() ~ Int
Return
Type | Description |
---|---|
Int | center y-position |
GetPosition
Gets sprite position
method : public : GetPosition() ~ Position
Return
Type | Description |
---|---|
Position | sprite position |
GetScale
Gets scaling percentage
method : public : GetScale() ~ Float
Return
Type | Description |
---|---|
Float | scaling percentage |
Render
Renders sprite
method : public : Render(x:Int, y:Int, clip:Rect, angle:Float, center:Point, flip:RendererFlip) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | x position |
y | Int | y position |
clip | Rect | clipping rectangle |
angle | Float | clipping rectangle |
center | Point | center point |
flip | RendererFlip | flip direction |
Set
Sets upper left 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 |
SetAlpha
Sets alpha
method : public : SetAlpha(alpha:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
alpha | Int | setting |
SetBlendMode
Sets blend mode
method : public : SetBlendMode(blending:BlendMode) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
blending | BlendMode | blend mode |
SetBottom
Sets bottom position
method : public : SetBottom(y2:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y2 | Int | bottom position |
SetCenter
Sets cener position
method : public : SetCenter(x:Int, y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | x-position |
y | Int | y-position |
SetCenterX
Sets center x-position
method : public : SetCenterX(x:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
x | Int | center x-position |
SetCenterY
Sets center y-position
method : public : SetCenterY(y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y | Int | center y-position |
SetColor
Sets the color
method : public : SetColor(red:Int, green:Int, blue:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
red | Int | red |
green | Int | green |
blue | Int | blue |
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 |
SetScale
Sets scaling percentage
method : public : SetScale(scale:Float) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
scale | Float | scaling percentage |
SetTop
Sets top position
method : public : SetTop(y:Int) ~ Nil
Parameters
Name | Type | Description |
---|---|---|
y | Int | top position |