Table of Contents

Class TextTextureUtil

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class TextTextureUtil
Inheritance
TextTextureUtil
Inherited Members

Constructors

TextTextureUtil(ICoreClientAPI)

Text Texture Util constructor.

public TextTextureUtil(ICoreClientAPI capi)

Parameters

capi ICoreClientAPI

The Client API.

Methods

GenOrUpdateTextTexture(string, CairoFont, int, int, ref LoadedTexture, TextBackground, EnumTextOrientation, bool)

Takes a texture and applies some text to it.

public void GenOrUpdateTextTexture(string text, CairoFont font, int width, int height, ref LoadedTexture loadedTexture, TextBackground background = null, EnumTextOrientation orientation = EnumTextOrientation.Left, bool demulAlpha = false)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

width int

The width of the text.

height int

The height of the text.

loadedTexture LoadedTexture

The texture to be loaded on to.

background TextBackground

The background of the text. (default: none/null)

orientation EnumTextOrientation

The orientation of the text. (default: left)

demulAlpha bool

GenOrUpdateTextTexture(string, CairoFont, ref LoadedTexture, TextBackground)

Takes a texture and applies some text to it.

public void GenOrUpdateTextTexture(string text, CairoFont font, ref LoadedTexture loadedTexture, TextBackground background = null)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

loadedTexture LoadedTexture

The texture to be loaded on to.

background TextBackground

The background of the text. (default: none/null)

GenTextTexture(string, CairoFont, int, int, TextBackground)

Takes a string of text and applies a texture to it.

public LoadedTexture GenTextTexture(string text, CairoFont font, int width, int height, TextBackground background = null)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

width int

The width of the text.

height int

The height of the text.

background TextBackground

The background of the text. (default: none/null)

Returns

LoadedTexture

The texturized text.

GenTextTexture(string, CairoFont, int, int, TextBackground, EnumTextOrientation, bool)

Takes a string of text and applies a texture to it.

public LoadedTexture GenTextTexture(string text, CairoFont font, int width, int height, TextBackground background = null, EnumTextOrientation orientation = EnumTextOrientation.Left, bool demulAlpha = false)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

width int

The width of the text.

height int

The height of the text.

background TextBackground

The background of the text. (default: none/null)

orientation EnumTextOrientation

The orientation of the text. (default: left)

demulAlpha bool

Returns

LoadedTexture

The texturized text.

GenTextTexture(string, CairoFont, int, TextBackground, EnumTextOrientation)

Takes a string of text and applies a texture to it.

public LoadedTexture GenTextTexture(string text, CairoFont font, int maxWidth, TextBackground background = null, EnumTextOrientation orientation = EnumTextOrientation.Left)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

maxWidth int

The maximum width of the text.

background TextBackground

The background of the text. (default: none/null)

orientation EnumTextOrientation

The orientation of the text. (default: left)

Returns

LoadedTexture

The texturized text.

GenTextTexture(string, CairoFont, TextBackground)

Takes a string of text and applies a texture to it.

public LoadedTexture GenTextTexture(string text, CairoFont font, TextBackground background = null)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

background TextBackground

The background of the text. (default: none/null)

Returns

LoadedTexture

The texturized text.

GenUnscaledTextTexture(string, CairoFont, TextBackground)

Generates an unscaled text texture.

public LoadedTexture GenUnscaledTextTexture(string text, CairoFont font, TextBackground background = null)

Parameters

text string

The text to texture.

font CairoFont

The font of the text.

background TextBackground

The background of the text (Default: none/null)

Returns

LoadedTexture

The loaded unscaled texture.