Class TextureRegionExtensions
This class provides a set of extension methods for dealing with TextureRegion
public static class TextureRegionExtensions
- Inheritance
-
TextureRegionExtensions
- Inherited Members
Methods
Add(StaticSpriteBatch, TextureRegion, RectangleF, Color)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, RectangleF destinationRectangle, Color color)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectangleFcolorColorA color mask.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, RectangleF, Color, float, Vector2, SpriteEffects, float)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, RectangleF destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectangleFcolorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, Rectangle, Color)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, Rectangle destinationRectangle, Color color)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectanglecolorColorA color mask.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, Rectangle, Color, float, Vector2, SpriteEffects, float)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectanglecolorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, Vector2, Color)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, Vector2 position, Color color)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
scaleVector2A scaling of this sprite.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Add(StaticSpriteBatch, TextureRegion, Vector2, Color, float, Vector2, float, SpriteEffects, float)
Adds an item to this batch. Note that this batch needs to currently be batching, meaning BeginBatch(SpriteSortMode?) has to have been called previously.
public static StaticSpriteBatch.Item Add(this StaticSpriteBatch batch, TextureRegion texture, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
Parameters
batchStaticSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
scalefloatA scaling of this sprite.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Returns
- StaticSpriteBatch.Item
The StaticSpriteBatch.Item that was created from the added data
Draw(SpriteBatch, TextureRegion, RectangleF, Color)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, RectangleF destinationRectangle, Color color)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectangleFcolorColorA color mask.
Draw(SpriteBatch, TextureRegion, RectangleF, Color, float, Vector2, SpriteEffects, float)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, RectangleF destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectangleFcolorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Draw(SpriteBatch, TextureRegion, Rectangle, Color)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, Rectangle destinationRectangle, Color color)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectanglecolorColorA color mask.
Draw(SpriteBatch, TextureRegion, Rectangle, Color, float, Vector2, SpriteEffects, float)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
destinationRectangleRectanglecolorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Draw(SpriteBatch, TextureRegion, Vector2, Color)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, Vector2 position, Color color)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
Draw(SpriteBatch, TextureRegion, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
scaleVector2A scaling of this sprite.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.
Draw(SpriteBatch, TextureRegion, Vector2, Color, float, Vector2, float, SpriteEffects, float)
Submit a sprite for drawing in the current batch.
public static void Draw(this SpriteBatch batch, TextureRegion texture, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
Parameters
batchSpriteBatchtextureTextureRegionA texture.
positionVector2The drawing location on screen.
colorColorA color mask.
rotationfloatA rotation of this sprite.
originVector2Center of the rotation. 0,0 by default.
scalefloatA scaling of this sprite.
effectsSpriteEffectsModificators for drawing. Can be combined.
layerDepthfloatA depth of the layer of this sprite.