Class TextureRegion
Defines a named rectangular region that represents the location and extents of a region within a source texture.
- Inheritance
-
Texture
Region
- Inherited Members
Constructors
- Texture
Region(string, Texture2D, Rectangle) Initializes a new instance of the Texture
Region class.
Properties
- Bounds
Gets the rectangular bounds that define the location and width and height extents, in pixels, of the region within the source texture that is represented by this Texture
Region .
- Name
Gets the name assigned to this Texture
Region .
- Texture
Gets the source texture used by this Texture
Region .
Methods
- Create
Nine Patch Slice(string, Rectangle, Rectangle, Vector2, Color) Creates and adds a new Nine
Patch element to this TextureSlice Region .
- Create
Slice(string, Rectangle, Vector2, Color) Creates and adds a new Slice element to this Texture
Region .
- Draw(Sprite
Batch, Rectangle, Color) Draws this Texture
Region instance using the Microsoft.Xna. provided.Framework. Graphics. Sprite Batch
- Draw(Sprite
Batch, Rectangle, Color, float, Vector2, Sprite Effects, float) Draws this Texture
Region instance using the Microsoft.Xna. provided.Framework. Graphics. Sprite Batch
- Draw(Sprite
Batch, Vector2, Color) Draws this Texture
Region instance using the Microsoft.Xna. provided.Framework. Graphics. Sprite Batch
- Draw(Sprite
Batch, Vector2, Color, float, Vector2, Vector2, Sprite Effects, float) Draws this Texture
Region instance using the Microsoft.Xna. provided.Framework. Graphics. Sprite Batch
- Draw(Sprite
Batch, Vector2, Color, float, Vector2, float, Sprite Effects, float) Draws this Texture
Region instance using the Microsoft.Xna. provided.Framework. Graphics. Sprite Batch
- Get
Slice(string) Returns the Slice element with the specified name from this Texture
Region .
- GetSlice<T>(string)
Returns the Slice element with the specified name from this Texture
Region as the type specified.
- Remove
All Slices() Removes all Slice elements from this Texture
Region .
- Remove
Slice(string) Removes the Slice element with the specified name from this Texture
Region .
- Try
Get Slice(string, out Slice?) Returns the Slice element with the specified name from this Texture
Region .
- TryGetSlice<T>(string, out T?)
Returns the Slice element with the specified name from this Texture
Region as the type specified.