VectorFont

Author

Colton Daily

Constructors

Link copied to clipboard
fun VectorFont(font: TtfFont)

Types

Link copied to clipboard
data class Text(var text: String = "", var pxScale: Int = 16, var color: Color = Color.BLACK)
Link copied to clipboard
data class TextBlock(var x: Float = 0.0f, var y: Float = 0.0f, val text: MutableList<VectorFont.Text> = mutableListOf())

Functions

Link copied to clipboard
fun flush(viewProjection: Mat4)

Renders the text to a stencil buffer in order to flip the pixels the correct way and then renders to the color buffer. This does not use any antialiasing. The color of the text passed in queue will be rendered.

Link copied to clipboard
open override fun prepare(context: Context)

Prepares/builds this object to be used by GL. Do any generating, uploading, etc of data here Only needs to be called ONCE per object!!

Link copied to clipboard

Queue a TextBlock to render.

Link copied to clipboard
fun resize(width: Int, height: Int, context: Context)

Resizes the internal frame buffer.

Properties

Link copied to clipboard
open override val prepared: Boolean