TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class IconItem in Tinman.Engine.Drawing

Describes an icon item in an icon atlas.

[ShutdownSurvive]
sealed class IconItem implements IResourceHandle

Remarks

IconItem objects act as resource handles and produce Bitmap resource objects.

Public / Attributes

Height

The untrimmed icon height.

public property Height { get }
type int32
value The untrimmed icon height.

See also:

IconAtlas.IconSize

HeightTrimmed

The trimmed icon height.

public property HeightTrimmed { get }
type int32
value The trimmed icon height.

OffsetX

The horizontal offset to the trimmed bounds.

public property OffsetX { get }
type int32
value The horizontal offset.

OffsetY

The vertical offset to the trimmed bounds.

public property OffsetY { get }
type int32
value The vertical offset.

Width

The untrimmed icon width.

public property Width { get }
type int32
value The untrimmed icon width.

See also:

IconAtlas.IconSize

WidthTrimmed

The trimmed icon width.

public property WidthTrimmed { get }
type int32
value The trimmed icon width.

Public / Constructors

IconItem

Creates a new instance of IconItem.

public constructor IconItem (IconAtlas icons, int32 x, int32 y, int32 width, int32 height, int32 offsetX, int32 offsetY)
params icons [not-null] The icon atlas that contains this icon.
  x [>=0] The X-coordinate of the icon.
  y [>=0] The Y-coordinate of the icon.
  width [>0] The icon width.
  height [>0] The icon height.
  offsetX [>=0] Offset from left edge to trimmed bounds.
  offsetY [>=0] Offset from top edge to trimmed bounds.

Public / Methods

CreateResource

Creates a new resource object, using the given graphics context.

[OwnerReturn]
public method CreateResource (Graphics graphics)
type IResource
params graphics [not-null] The graphics context to use.
returns [not-null] The resource object.
implements IResourceHandle.CreateResource

Remarks:

Resource objects may implement the IMemoryConsumption interface. In this case, the reported memory consumption will be interpreted as an estimate on how much GPU memory is consumed by the resource. This estimate can then be used for resource caching (e.g. CacheMemory).

Exceptions:

Equals

Compares this object with the given one.

[Pure]
public method Equals (IResourceHandle other)
type bool
params other The object to compare to.
returns true if this object is equal to other, false if not.

GetHashCode

[Pure]
public override method GetHashCode ()
type int32