Class SubTexture
A part of another texture, which can be drawn as an image of its own. The pixels stay in ParentTexture; this holds the Region of them.
public class SubTexture : ITexture
- Inheritance
-
SubTexture
- Implements
- Inherited Members
Constructors
SubTexture(ITexture)
Creates a sub-texture covering the whole of parentTexture.
public SubTexture(ITexture parentTexture)
Parameters
parentTextureITexture
SubTexture(ITexture, Rectangle)
Creates a sub-texture covering location of parentTexture.
public SubTexture(ITexture parentTexture, Rectangle location)
Parameters
SubTexture(ITexture, Vector2)
Creates a sub-texture from position to the parent's right and bottom edges.
public SubTexture(ITexture parentTexture, Vector2 position)
Parameters
SubTexture(ITexture, Vector2, Vector2)
Creates a sub-texture at position that is size pixels, each truncated to a whole number.
public SubTexture(ITexture parentTexture, Vector2 position, Vector2 size)
Parameters
Properties
ParentTexture
The texture this is a part of.
public ITexture ParentTexture { get; }
Property Value
Region
The part of ParentTexture this covers, in pixels. Setting it changes what is drawn.
public TextureRegion Region { get; set; }
Property Value
Methods
~SubTexture()
Releases the instance count. The parent texture is not disposed.
protected ~SubTexture()