Class IconComponent
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
Draws an icon
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
capi
ICoreClientAPIiconName
stringiconPath
stringfont
CairoFont
Fields
capi
protected ICoreClientAPI capi
Field Value
font
protected CairoFont font
Field Value
iconName
protected string iconName
Field Value
iconPath
protected string iconPath
Field Value
offY
public double offY
Field Value
parentBounds
protected ElementBounds parentBounds
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
flowPath
TextFlowPath[]currentLineHeight
doubleoffsetX
doublelineY
doublenextOffsetX
double
Returns
ComposeElements(Context, ImageSurface)
Composes the element.
public override void ComposeElements(Context ctx, ImageSurface surface)
Parameters
ctx
Contextsurface
ImageSurface
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)