Class NineSlice
Definition
Namespace: StardewUI.Graphics
Assembly: StardewUI.dll
Draws sprites according to a nine-slice scale.
Inheritance
Object ⇦ NineSlice
Members
Constructors
Name | Description |
---|---|
NineSlice(Sprite) | Draws sprites according to a nine-slice scale. |
Properties
Name | Description |
---|---|
Sprite | The source sprite. |
Methods
Name | Description |
---|---|
Draw(ISpriteBatch, Color?, SpriteEffects) | Draws the sprite to an ISpriteBatch, applying 9-slice scaling if specified. |
Layout(Rectangle, SimpleRotation?) | Prepares the layout for next Draw(ISpriteBatch, Color?, SpriteEffects). |
Details
Constructors
NineSlice(Sprite)
Draws sprites according to a nine-slice scale.
Parameters
sprite
Sprite
The source sprite.
Properties
Sprite
The source sprite.
Property Value
Methods
Draw(ISpriteBatch, Color?, SpriteEffects)
Draws the sprite to an ISpriteBatch, applying 9-slice scaling if specified.
public void Draw(StardewUI.Graphics.ISpriteBatch b, Microsoft.Xna.Framework.Color? tint, Microsoft.Xna.Framework.Graphics.SpriteEffects effects);
Parameters
b
ISpriteBatch
Output sprite batch.
tint
Nullable<Color>
Optional tint multiplier color.
effects
SpriteEffects
Sprite effect to apply, e.g. for drawing flipped.
Layout(Rectangle, SimpleRotation?)
Prepares the layout for next Draw(ISpriteBatch, Color?, SpriteEffects).
public void Layout(Microsoft.Xna.Framework.Rectangle destinationRect, StardewUI.Graphics.SimpleRotation? rotation);
Parameters
destinationRect
Rectangle
The rectangular area that the drawn sprite should fill.
rotation
Nullable<SimpleRotation>
Rotation to apply to the source sprite, if any.