Texture

interface Texture : Image

A bitmap graphic.

Texture extends Image, so that the whole texture can be drawn to the screen.

However, textures often consist of many individual pictures (such as icons), and each small picture is an Image using PartialTexture.

Properties

Link copied to clipboard
abstract val height: Int
Link copied to clipboard
open override val imageHeight: Float
Link copied to clipboard
open override val imageWidth: Float
Link copied to clipboard
abstract val name: String
Link copied to clipboard
abstract val width: Int

Functions

Link copied to clipboard
open override fun batch(tint: Color?, block: TextureBatch.() -> Unit)
Link copied to clipboard
abstract fun bind()
Link copied to clipboard
open override fun draw(x: Float, y: Float, tint: Color?)
Link copied to clipboard
open override fun drawBatched(batch: TextureBatch, x: Float, y: Float)
Link copied to clipboard
open override fun drawTo(x: Float, y: Float, destWidth: Float, destHeight: Float, tint: Color?)
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
open override fun partialImage(fromX: Float, fromY: Float, width: Float, height: Float): Image

Takes a rectangular region of this Image, and returns it as an Image. Note, the pixel data is NOT copied

Link copied to clipboard
open override fun scaledBy(scaleX: Float, scaleY: Float): Image

Returns an Image using the same pixel data as this image, but it lies about its actual size.