SpriteImgSrc

open class SpriteImgSrc : ImgSrc

A SpriteImgSrc class used to define a sprite image for the UIKit.widgets.Image UI element

Each sub-image within the sprite is represented by its x,y position and width,height

Usually, many SpriteImgSrc will exist to draw several sub-image from the same nameWithExtension sprite image

NOTE: The SpriteImgSrc uses Slot.s0, so the slot must not be used with a different image

See also

Constructors

Link copied to clipboard
constructor(nameWithExtension: String, spriteX: Int, spriteY: Int, spriteWidth: Int, spriteHeight: Int, tag: String = "")

Constrictor receiving png sprite image name

constructor(nameWithExtension: String, spriteX: Short, spriteY: Short, spriteWidth: Short, spriteHeight: Short, tag: String = "")

Constrictor receiving png sprite image name

constructor(data: ByteArray, iType: ImageType, spriteX: Int, spriteY: Int, spriteWidth: Int, spriteHeight: Int, tag: String = "")

Constrictor receiving image binary data

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun loadResource(): Boolean

Pre-Load the resource binary data from the application resources

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

The height of the sprite sub-image in pixels, same as imageHeight

Link copied to clipboard

The width of the sprite sub-image in pixels, same as imageWidth

Link copied to clipboard

The x position of the sprite sub-image in pixels

Link copied to clipboard

The y position of the sprite sub-image in pixels