Class TextTextureUtil
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public class TextTextureUtil
- Inheritance
-
TextTextureUtil
- Inherited Members
- Extension Methods
Constructors
TextTextureUtil(ICoreClientAPI)
Text Texture Util constructor.
public TextTextureUtil(ICoreClientAPI capi)
Parameters
capi
ICoreClientAPIThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
width
intThe width of the text.
height
intThe height of the text.
loadedTexture
LoadedTextureThe texture to be loaded on to.
background
TextBackgroundThe background of the text. (default: none/null)
orientation
EnumTextOrientationThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
loadedTexture
LoadedTextureThe texture to be loaded on to.
background
TextBackgroundThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
width
intThe width of the text.
height
intThe height of the text.
background
TextBackgroundThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
width
intThe width of the text.
height
intThe height of the text.
background
TextBackgroundThe background of the text. (default: none/null)
orientation
EnumTextOrientationThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
maxWidth
intThe maximum width of the text.
background
TextBackgroundThe background of the text. (default: none/null)
orientation
EnumTextOrientationThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
background
TextBackgroundThe 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
stringThe text to texture.
font
CairoFontThe font of the text.
background
TextBackgroundThe background of the text (Default: none/null)
Returns
- LoadedTexture
The loaded unscaled texture.