Table of Contents

Class IconUtil

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll
public class IconUtil
Inheritance
IconUtil
Inherited Members
Extension Methods

Constructors

IconUtil(ICoreClientAPI)

Creates a new IconUtil instance.

public IconUtil(ICoreClientAPI capi)

Parameters

capi ICoreClientAPI

The Client API.

Fields

CustomIcons

public Dictionary<string, IconRendererDelegate> CustomIcons

Field Value

Dictionary<string, IconRendererDelegate>

Methods

DrawArrowRight(Context, double, bool, bool)

public void DrawArrowRight(Context cr, double lineWidth = 5, bool strokeOrFill = true, bool defaultPattern = true)

Parameters

cr Context
lineWidth double
strokeOrFill bool
defaultPattern bool

DrawConnectionQuality(Context, double, double, int, double)

Draws 5 vertical bars of increasing size and Quality amount of them green

public void DrawConnectionQuality(Context ctx, double x, double y, int quality, double size)

Parameters

ctx Context
x double
y double
quality int
size double

DrawCross(Context, double, double, double, double, bool)

public void DrawCross(Context ctx, double x, double y, double lineWidth, double size, bool preserverePath = false)

Parameters

ctx Context
x double
y double
lineWidth double
size double
preserverePath bool

DrawFlame(Context, double, bool, bool)

public void DrawFlame(Context cr, double lineWidth = 3, bool strokeOrFill = true, bool defaultPattern = true)

Parameters

cr Context
lineWidth double
strokeOrFill bool
defaultPattern bool

DrawIcon(Context, string, double, double, double, double, double[])

Draws the icon.

public void DrawIcon(Context cr, string type, double x, double y, double width, double height, double[] rgba)

Parameters

cr Context

The context.

type string

The type to draw

x double

X position of the Icon.

y double

Y position of the Icon.

width double

Width of the Icon.

height double

Height of the Icon.

rgba double[]

The color of the icon.

DrawIconInt(Context, string, int, int, float, float, double[])

Draws the icon.

public void DrawIconInt(Context cr, string type, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context

The context.

type string

The type of icon to draw

x int

X position of the Icon.

y int

Y position of the Icon.

width float

Width of the Icon.

height float

Height of the Icon.

rgba double[]

The color of the icon.

DrawLeftMouseButton(Context, int, int, float, float, double[])

public void DrawLeftMouseButton(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawMapMarker(Context, int, int, float, float, double[])

public void DrawMapMarker(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawMapPlayer(Context, int, int, float, float, double[], double[])

public void DrawMapPlayer(Context cr, int x, int y, float width, float height, double[] strokeRgba, double[] fillRgba)

Parameters

cr Context
x int
y int
width float
height float
strokeRgba double[]
fillRgba double[]

DrawPen(Context, double, double, double, double)

public void DrawPen(Context ctx, double x, double y, double lineWidth, double size)

Parameters

ctx Context
x double
y double
lineWidth double
size double

DrawPlus(Context, int, int, float, float, double[], double)

public void DrawPlus(Context ctx, int x, int y, float width, float height, double[] strokeRgba, double lineWidth)

Parameters

ctx Context
x int
y int
width float
height float
strokeRgba double[]
lineWidth double

DrawRandomSymbol(Context, double, double, double, double[], double, int, int)

public void DrawRandomSymbol(Context ctx, double x, double y, double size, double[] color, double lineWidth, int seed, int addLines = 0)

Parameters

ctx Context
x double
y double
size double
color double[]
lineWidth double
seed int
addLines int

DrawRightMouseButton(Context, int, int, float, float, double[])

public void DrawRightMouseButton(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawVSGear(Context, ImageSurface, int, int, float, float, double[])

public void DrawVSGear(Context cr, ImageSurface surface, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
surface ImageSurface
x int
y int
width float
height float
rgba double[]

DrawWayointBee(Context, int, int, float, float, double[])

public void DrawWayointBee(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointCave(Context, int, int, float, float, double[])

public void DrawWaypointCave(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointCircle(Context, int, int, float, float, double[])

public void DrawWaypointCircle(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointHome(Context, int, int, float, float, double[])

public void DrawWaypointHome(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointLadder(Context, int, int, float, float, double[])

public void DrawWaypointLadder(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointPick(Context, int, int, float, float, double[])

public void DrawWaypointPick(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointPlayer(Context, int, int, float, float, double[])

public void DrawWaypointPlayer(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointRocks(Context, int, int, float, float, double[])

public void DrawWaypointRocks(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointRuins(Context, int, int, float, float, double[])

public void DrawWaypointRuins(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointSpiral(Context, int, int, float, float, double[])

public void DrawWaypointSpiral(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointStar1(Context, int, int, float, float, double[])

public void DrawWaypointStar1(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointStar2(Context, int, int, float, float, double[])

public void DrawWaypointStar2(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointTrader(Context, int, int, float, float, double[])

public void DrawWaypointTrader(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

DrawWaypointVessel(Context, int, int, float, float, double[])

public void DrawWaypointVessel(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawairbrush_svg(Context, int, int, float, float, double[])

public void Drawairbrush_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawapple_svg(Context, int, int, float, float, double[])

public void Drawapple_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawbasket_svg(Context, int, int, float, float, double[])

public void Drawbasket_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawbelt_svg(Context, int, int, float, float, double[])

public void Drawbelt_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawboots_svg(Context, int, int, float, float, double[])

public void Drawboots_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawbracers_svg(Context, int, int, float, float, double[])

public void Drawbracers_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawbrush_svg(Context, int, int, float, float, double[])

public void Drawbrush_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawcape_svg(Context, int, int, float, float, double[])

public void Drawcape_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawcursor_svg(Context, int, int, float, float, double[])

public void Drawcursor_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawdice_svg(Context, int, int, float, float, double[])

public void Drawdice_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawduplicate_svg(Context, int, int, float, float, double[])

public void Drawduplicate_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Draweraser_svg(Context, int, int, float, float, double[])

public void Draweraser_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawerode_svg(Context, int, int, float, float, double[])

public void Drawerode_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawfloodfill_svg(Context, int, int, float, float, double[])

public void Drawfloodfill_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawgloves_svg(Context, int, int, float, float, double[])

public void Drawgloves_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawgrowshrink_svg(Context, int, int, float, float, double[])

public void Drawgrowshrink_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawhandheld_svg(Context, int, int, float, float, double[])

public void Drawhandheld_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawhat_svg(Context, int, int, float, float, double[])

public void Drawhat_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawhealth_svg(Context, int, int, float, float, double[])

public void Drawhealth_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawimport_svg(Context, int, int, float, float, double[])

public void Drawimport_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawlake_svg(Context, int, int, float, float, double[])

public void Drawlake_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawleft_svg(Context, int, int, float, float, double[])

public void Drawleft_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawline_svg(Context, int, int, float, float, double[])

public void Drawline_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawmask_svg(Context, int, int, float, float, double[])

public void Drawmask_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawmedal_svg(Context, int, int, float, float, double[])

public void Drawmedal_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawmenuicon_svg(Context, double, double, float, float, double[])

public void Drawmenuicon_svg(Context cr, double x, double y, float width, float height, double[] rgba)

Parameters

cr Context
x double
y double
width float
height float
rgba double[]

Drawnecklace_svg(Context, int, int, float, float, double[])

public void Drawnecklace_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawnone_svg(Context, int, int, float, float, double[])

public void Drawnone_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawoffhand_svg(Context, int, int, float, float, double[])

public void Drawoffhand_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawpullover_svg(Context, int, int, float, float, double[])

public void Drawpullover_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawraiselower_svg(Context, int, int, float, float, double[])

public void Drawraiselower_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawredo_svg(Context, int, int, float, float, double[])

public void Drawredo_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawrepeat_svg(Context, int, int, float, float, double[])

public void Drawrepeat_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawright_svg(Context, int, int, float, float, double[])

public void Drawright_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawring_svg(Context, int, int, float, float, double[])

public void Drawring_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawselect_svg(Context, int, int, float, float, double[])

public void Drawselect_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawshirt_svg(Context, int, int, float, float, double[])

public void Drawshirt_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawtree_svg(Context, int, int, float, float, double[])

public void Drawtree_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawtrousers_svg(Context, int, int, float, float, double[])

public void Drawtrousers_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

Drawundo_svg(Context, int, int, float, float, double[])

public void Drawundo_svg(Context cr, int x, int y, float width, float height, double[] rgba)

Parameters

cr Context
x int
y int
width float
height float
rgba double[]

GenTexture(int, int, DrawDelegate)

Generates the texture.

public LoadedTexture GenTexture(int width, int height, DrawDelegate drawHandler)

Parameters

width int

The width of the drawing

height int

The height of the drawing.

drawHandler DrawDelegate

A delegate which handles the drawing.

Returns

LoadedTexture

The resulting built texture.

GenTexture(int, int, IAsset, double[])

public LoadedTexture GenTexture(int width, int height, IAsset asset, double[] rgba = null)

Parameters

width int
height int
asset IAsset
rgba double[]

Returns

LoadedTexture

SvgIconSource(AssetLocation)

public IconRendererDelegate SvgIconSource(AssetLocation loc)

Parameters

loc AssetLocation

Returns

IconRendererDelegate

SvgIconSource(IAsset)

public IconRendererDelegate SvgIconSource(IAsset asset)

Parameters

asset IAsset

Returns

IconRendererDelegate