Table of Contents

Class IconComponent

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

Draws an icon

public class IconComponent : RichTextComponentBase
Inheritance
IconComponent
Inherited Members

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

Fields

capi

protected ICoreClientAPI capi

Field Value

ICoreClientAPI

font

protected CairoFont font

Field Value

CairoFont

iconName

protected string iconName

Field Value

string

iconPath

protected string iconPath

Field Value

string

offY

public double offY

Field Value

double

parentBounds

protected ElementBounds parentBounds

Field Value

ElementBounds

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