Class IconComponent
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Draws an icon Open in GitHub
public class IconComponent : RichTextComponentBase
- Inheritance
-
IconComponent
- Inherited Members
- Extension Methods
Constructors
IconComponent(ICoreClientAPI, string, string, CairoFont)
public IconComponent(ICoreClientAPI capi, string iconName, string iconPath, CairoFont font)
Parameters
capiICoreClientAPIiconNamestringiconPathstringfontCairoFont
IconComponent(ICoreClientAPI, string, string, CairoFont, bool, double[])
public IconComponent(ICoreClientAPI capi, string iconName, string iconPath, CairoFont font, bool useSvgColor, double[] svgBgColor)
Parameters
capiICoreClientAPIiconNamestringiconPathstringfontCairoFontuseSvgColorboolsvgBgColordouble[]
Fields
SvgBgColor
protected double[] SvgBgColor
Field Value
- double[]
UseSvgColor
protected bool UseSvgColor
Field Value
capi
protected ICoreClientAPI capi
Field Value
font
protected CairoFont font
Field Value
iconName
protected string iconName
Field Value
iconPath
public string iconPath
Field Value
sizeMulSvg
public double sizeMulSvg
Field Value
Methods
CalcBounds(TextFlowPath[], double, double, double, out double)
Initializes the size and stuff. Return true if you had to enter the next line
public override EnumCalcBoundsResult CalcBounds(TextFlowPath[] flowPath, double currentLineHeight, double offsetX, double lineY, out double nextOffsetX)
Parameters
flowPathTextFlowPath[]currentLineHeightdoubleoffsetXdoublelineYdoublenextOffsetXdouble
Returns
ComposeElements(Context, ImageSurface)
Composes the element.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctxContextsurfaceImageSurface
Dispose()
public override void Dispose()
RenderInteractiveElements(float, double, double, double)
Renders the text component.
public override void RenderInteractiveElements(float deltaTime, double renderX, double renderY, double renderZ)