Describes an icon item in an icon atlas.
sealed class
|
IconItem
|
implements
|
IResourceHandle
|
No icon.
public
static
readonly
field
|
None
|
||
type
|
IconItem
|
public
property
|
Height
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
HeightTrimmed
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
OffsetX
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
OffsetY
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
Width
{
get
}
|
||
type
|
int32
|
||
value
|
public
property
|
WidthTrimmed
{
get
}
|
||
type
|
int32
|
||
value
|
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
or
null . |
|||
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).
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.
|
|||
implements
|
IEquatable.Equals
|
[Pure]
|
||||
public
override
method
|
GetHashCode
()
|
|||
type
|
int32
|
[Pure]
|
||||
public
override
method
|
ToString
()
|
|||
type
|
string
|