PartialTexture
class PartialTexture(val texture: Texture, val srcX: Float, val srcY: Float, val imageWidth: Float, val imageHeight: Float) : Image
Defines a rectangular region of a Texture as an Image. For example, it is common to place many icons in a single .png
file, which is loaded as a single Texture. Each icon is then defined using PartialTexture.
NOTE. Ensure that there is at least 1 transparent pixel between each icon, otherwise the colors of the neighbouring icons can 'bleed' this icon when rendered. Google 'opengl texture bleeding' for details.
Constructors
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun drawToBatched(batch: TextureBatch, x: Float, y: Float, destWidth: Float, destHeight: Float)
The same as the other drawTo, but using a TextureBatch for efficiency.
Link copied to clipboard