IconAtlas

Description

class Tinman.Engine.Drawing.IconAtlas

Extended by

DefaultIcons sealed

Base class for icon atlases.

Public / Constructors

Icon​Atlas


public constructor IconAtlas → (3)

iconWidth in : int32

[>0]
The icon width.

iconHeight in : int32

[>0]
The icon height.

handle in : IResourceHandle

[not-null]
The resource handle.

Creates a new icon atlas.

Public / Methods

Add


public method Add → (7)

name in : string

[not-empty]
The icon name.

in : int32

[>=0]
The X-coordinate of the icon.

in : int32

[>=0]
The Y-coordinate of the icon.

width in : int32

[>0]
The icon width.

height in : int32

[>0]
The icon height.

offsetX in : int32

[>=0]
Offset from left edge to trimmed bounds.

offsetY in : int32

[>=0]
Offset from top edge to trimmed bounds.

returns → IconItem

The creates IconItem object.

Creates a new instance of IconItem and adds it to this icon atlas.

Public / Attributes

Handle


public attribute Handle → (get)

value : IResourceHandle

The Bitmap handle.

The bitmap handle for loading the icon atlas image.

Icons


public attribute Icons → (get)

value : ISortedMapConst<string, IconItem>

[not-null]
The icons.

Returns the icons of this atlas.

Icon​Size


public attribute IconSize → (get)

value : Vec2I

The untrimmed icon size.

Returns the untrimmed icon size.