TexturedFont

class TexturedFont(texture: BufferedImage, basicWidth: Int, basicHeight: Int, find: (Char) -> Pair<Int, Int>) : Texture

Constructors

Link copied to clipboard
constructor(texture: BufferedImage, basicWidth: Int, basicHeight: Int, find: (Char) -> Pair<Int, Int>)

Properties

Link copied to clipboard
val height: Int

The height of the Texture.

Link copied to clipboard
Link copied to clipboard
val width: Int

The width of the Texture.

Functions

Link copied to clipboard

Return an instance of TextureOp which implements a convolution from the source texture to the destination texture with the ability removing the image noise of this texture.

Link copied to clipboard

Return an instance of TextureOp which implements a convolution from the source texture to the destination texture with the ability removing the image noise of this texture., and the kernel is a 3 * 3 matrix.

Link copied to clipboard

Return an instance of TextureOp which implements a convolution from the source texture to the destination texture. Convolution using a convolution kernel is a spatial operation that computes the output pixel from an input pixel by multiplying the kernel with the surround of the input pixel. This allows the output pixel to be affected by the immediate neighborhood in a way that can be mathematically specified with a kernel, and the kernel size is 3 * 3 by passing in a float array with the length of 9.

Link copied to clipboard
open fun cut(x: Int, y: Int, w: Int, h: Int, name: String = ""): Texture

Returns a sub-texture defined by a specified rectangular region. The returned Texture shares the same data array as the original.

Link copied to clipboard

Return an instance of TextureOp which implements a convolution from the source texture to the destination texture provided a Gaussian blur effect for textures, and its convolve kernel conforms to the Gaussian distribution with sum of 1, and the kernel is a 3 * 3 matrix, and the length should be odd.

Link copied to clipboard

Return an instance of TextureOp which implements a convolution from the source texture to the destination texture provided a Gaussian blur effect for textures, and its convolve kernel conforms to the Gaussian distribution with sum of 1, and the kernel is a 3 * 3 matrix.

Link copied to clipboard
operator fun invoke(): BufferedImage

Get the texture.

Link copied to clipboard

Returns a Texture operation without any change. The matrix is:

Link copied to clipboard
open fun paint(r: Graphics2D, op: Texture.TextureOp, x: Int, y: Int)

Renders a Texture that is filtered with a BufferedImageOp. The rendering attributes applied to include the Clip, Transform and Composite attributes.

Link copied to clipboard
fun render(r: Graphics2D, number: Number, x: Int, y: Int)
fun render(r: Graphics2D, str: String, x: Int, y: Int)
Link copied to clipboard

Calculate and return the correct rendering coordinate, which can make the texture's center coincides with the given point specified by its coordinates.

fun renderPoint(x: Int, y: Int, rad: Double): Point
fun renderPoint(x: Int, y: Int, sin: Double, cos: Double): Point

Calculate and return the correct rendering coordinate, which can make center of the rotated texture, the rotate degree is specified in parameters, coincides with the given point specified by its coordinates.

Link copied to clipboard

Returns a TextureOp that can be used to rotate the texture.

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