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
capiICoreClientAPIThe 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
textstringThe text to texture.
fontCairoFontThe font of the text.
widthintThe width of the text.
heightintThe height of the text.
loadedTextureLoadedTextureThe texture to be loaded on to.
backgroundTextBackgroundThe background of the text. (default: none/null)
orientationEnumTextOrientationThe orientation of the text. (default: left)
demulAlphabool
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
textstringThe text to texture.
fontCairoFontThe font of the text.
loadedTextureLoadedTextureThe texture to be loaded on to.
backgroundTextBackgroundThe 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
textstringThe text to texture.
fontCairoFontThe font of the text.
widthintThe width of the text.
heightintThe height of the text.
backgroundTextBackgroundThe 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
textstringThe text to texture.
fontCairoFontThe font of the text.
widthintThe width of the text.
heightintThe height of the text.
backgroundTextBackgroundThe background of the text. (default: none/null)
orientationEnumTextOrientationThe orientation of the text. (default: left)
demulAlphabool
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
textstringThe text to texture.
fontCairoFontThe font of the text.
maxWidthintThe maximum width of the text.
backgroundTextBackgroundThe background of the text. (default: none/null)
orientationEnumTextOrientationThe 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
textstringThe text to texture.
fontCairoFontThe font of the text.
backgroundTextBackgroundThe 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
textstringThe text to texture.
fontCairoFontThe font of the text.
backgroundTextBackgroundThe background of the text (Default: none/null)
Returns
- LoadedTexture
The loaded unscaled texture.