Class TextureRectSpriteConverter
Definition
Namespace: StardewUI.Framework.Converters
Assembly: StardewUI.dll
Converts a tuple with a texture and source rectangle (within the texture) to a sprite record.
public class TextureRectSpriteConverter :
StardewUI.Framework.Converters.IValueConverter<Tuple<Microsoft.Xna.Framework.Graphics.Texture2D, Microsoft.Xna.Framework.Rectangle>, StardewUI.Graphics.Sprite>,
StardewUI.Framework.Converters.IValueConverter
Inheritance
Object ⇦ TextureRectSpriteConverter
Implements
IValueConverter<Tuple<Texture2D, Rectangle>, Sprite>, IValueConverter
Members
Constructors
Name | Description |
---|---|
TextureRectSpriteConverter() |
Methods
Name | Description |
---|---|
Convert(Tuple<Texture2D, Rectangle>) | Converts a value from the source type to the destination type. |
Details
Constructors
TextureRectSpriteConverter()
Methods
Convert(Tuple<Texture2D, Rectangle>)
Converts a value from the source type to the destination type.
public StardewUI.Graphics.Sprite Convert(Tuple<Microsoft.Xna.Framework.Graphics.Texture2D, Microsoft.Xna.Framework.Rectangle> value);
Parameters
value
Tuple<Texture2D, Rectangle>
The value to convert.