GFX

object GFX : Resources<Texture, String>

Used to load and get the textures.

Supported Image Type can be specified by ImageIO.getReaderFormatNames.

Author

KKoishi_

Functions

Link copied to clipboard
open operator override fun get(key: String): Texture

Get the ResourceType by provide the specified key.

Link copied to clipboard
Link copied to clipboard
fun loadTexture(key: String, path: String, useVRAM: Boolean = false)

Load the texture according to the given path and set the texture key.

Link copied to clipboard

Get the texture returned when the key is not found.

Link copied to clipboard
fun Graphics2D.renderNumber(n: Number, x: Int, y: Int, texturedFont: String)
Link copied to clipboard
fun Graphics2D.renderString(s: String, x: Int, y: Int, texturedFont: String)
Link copied to clipboard
fun Graphics2D.renderTypedNumber(n: Long, x: Int, y: Int, texturedFont: String, maxLength: Int = 10)
Link copied to clipboard
open operator override fun set(key: String, value: String)

Load the ResourceType by provide the specified LoadType, and related it with the key..

operator fun set(key: String, useVRAM: Boolean, path: String)
Link copied to clipboard
fun shearTexture(key: String, nKey: String, x: Int, y: Int, w: Int, h: Int)

According to the given rectangular range, it will cut out another texture from one texture, and the texture to be cut is given by its key; the key of the new texture is the parameter nKey.