Class Sprite
Definition
Namespace: StardewUI.Graphics
Assembly: StardewUI.dll
Definition for a scalable sprite.
Inheritance
Object ⇦ Sprite
Implements
IEquatable<Sprite>
Members
Constructors
Name | Description |
---|---|
Sprite(Texture2D, Rectangle?, Edges, SliceSettings) | Definition for a scalable sprite. |
Properties
Name | Description |
---|---|
EqualityContract | |
FixedEdges | The thickness of each "fixed" edge to use with 9-patch/9-slice scaling. Specifying these values can prevent corner distortion for images that have been designed for such scaling. See Nine-Slice Scaling for a detailed explanation. |
Size | The size (width/height) of the sprite, in pixels. |
SliceSettings | Additional settings for the scaling and slicing behavior. |
SourceRect | The inner area of the Texture in which the specific image is located, or null to draw the entire texture. |
Texture | The texture containing the sprite's pixel data. |
Details
Constructors
Sprite(Texture2D, Rectangle?, Edges, SliceSettings)
Definition for a scalable sprite.
public Sprite(Microsoft.Xna.Framework.Graphics.Texture2D Texture, Microsoft.Xna.Framework.Rectangle? SourceRect, StardewUI.Layout.Edges FixedEdges, StardewUI.Graphics.SliceSettings SliceSettings);
Parameters
Texture
Texture2D
The texture containing the sprite's pixel data.
SourceRect
Nullable<Rectangle>
The inner area of the Texture
in which the specific image is located, or null
to draw the entire texture.
FixedEdges
Edges
The thickness of each "fixed" edge to use with 9-patch/9-slice scaling. Specifying these values can prevent corner distortion for images that have been designed for such scaling. See Nine-Slice Scaling for a detailed explanation.
SliceSettings
SliceSettings
Additional settings for the scaling and slicing behavior.
Properties
EqualityContract
Property Value
FixedEdges
The thickness of each "fixed" edge to use with 9-patch/9-slice scaling. Specifying these values can prevent corner distortion for images that have been designed for such scaling. See Nine-Slice Scaling for a detailed explanation.
Property Value
Size
The size (width/height) of the sprite, in pixels.
Property Value
SliceSettings
Additional settings for the scaling and slicing behavior.
Property Value
SourceRect
The inner area of the Texture
in which the specific image is located, or null
to draw the entire texture.
Property Value
Texture
The texture containing the sprite's pixel data.