Describes an icon item in an icon atlas.
[ShutdownSurvive]
|
|||||
sealed class
|
IconItem
|
implements
|
IResourceHandle
|
IconItem objects act as resource handles and produce Bitmap resource objects.
The untrimmed icon height.
public
property
|
Height
{
get
}
|
||
type
|
int32
|
||
value
|
The untrimmed icon height. |
See also:
IconAtlas.IconSizeThe trimmed icon height.
public
property
|
HeightTrimmed
{
get
}
|
||
type
|
int32
|
||
value
|
The trimmed icon height. |
The horizontal offset to the trimmed bounds.
public
property
|
OffsetX
{
get
}
|
||
type
|
int32
|
||
value
|
The horizontal offset. |
The vertical offset to the trimmed bounds.
public
property
|
OffsetY
{
get
}
|
||
type
|
int32
|
||
value
|
The vertical offset. |
The untrimmed icon width.
public
property
|
Width
{
get
}
|
||
type
|
int32
|
||
value
|
The untrimmed icon width. |
See also:
IconAtlas.IconSizeThe trimmed icon width.
public
property
|
WidthTrimmed
{
get
}
|
||
type
|
int32
|
||
value
|
The trimmed icon width. |
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. |
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
|
|
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:
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.
|
[Pure]
|
||||
public
override
method
|
GetHashCode
()
|
|||
type
|
int32
|