Table of Contents

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

capi ICoreClientAPI
iconName string
iconPath string
font CairoFont

IconComponent(ICoreClientAPI, string, string, CairoFont, bool, double[])

public IconComponent(ICoreClientAPI capi, string iconName, string iconPath, CairoFont font, bool useSvgColor, double[] svgBgColor)

Parameters

capi ICoreClientAPI
iconName string
iconPath string
font CairoFont
useSvgColor bool
svgBgColor double[]

Fields

SvgBgColor

protected double[] SvgBgColor

Field Value

double[]

UseSvgColor

protected bool UseSvgColor

Field Value

bool

capi

protected ICoreClientAPI capi

Field Value

ICoreClientAPI

font

protected CairoFont font

Field Value

CairoFont

iconName

protected string iconName

Field Value

string

iconPath

public string iconPath

Field Value

string

sizeMulSvg

public double sizeMulSvg

Field Value

double

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 double
offsetX double
lineY double
nextOffsetX double

Returns

EnumCalcBoundsResult

A

ComposeElements(Context, ImageSurface)

Composes the element.

public override void ComposeElements(Context ctx, ImageSurface surface)

Parameters

ctx Context
surface 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)

Parameters

deltaTime float
renderX double
renderY double
renderZ double