Method Draw
Draw(SpriteBatch, Rectangle, Color)
Draws this TextureRegion instance using the Microsoft.Xna.Framework.Graphics.SpriteBatch provided.
public void Draw(SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
destinationRectangle
RectangleA rectangular bound that defines the destination to render this TextureRegion into.
color
ColorThe color mask to apply when rendering this TextureRegion.
Draw(SpriteBatch, Vector2, Color)
Draws this TextureRegion instance using the Microsoft.Xna.Framework.Graphics.SpriteBatch provided.
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color color)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
position
Vector2The x- and y-coordinate location to render this TextureRegion at.
color
ColorThe color mask to apply when rendering this TextureRegion.
Draw(SpriteBatch, Vector2, Color, float, Vector2, float, SpriteEffects, float)
Draws this TextureRegion instance using the Microsoft.Xna.Framework.Graphics.SpriteBatch provided.
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color color, float rotation, Vector2 origin, float scale, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
position
Vector2The x- and y-coordinate location to render this TextureRegion at.
color
ColorThe color mask to apply when rendering this TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
scale
floatThe amount of scaling to apply when rendering this TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepth
floatThe layer depth to apply when rendering this TextureRegion.
Draw(SpriteBatch, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float)
Draws this TextureRegion instance using the Microsoft.Xna.Framework.Graphics.SpriteBatch provided.
public void Draw(SpriteBatch spriteBatch, Vector2 position, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
position
Vector2The x- and y-coordinate location to render this TextureRegion at.
color
ColorThe color mask to apply when rendering this TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
scale
Vector2The amount of scaling to apply when rendering this TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepth
floatThe layer depth to apply when rendering this TextureRegion.
Draw(SpriteBatch, Rectangle, Color, float, Vector2, SpriteEffects, float)
Draws this TextureRegion instance using the Microsoft.Xna.Framework.Graphics.SpriteBatch provided.
public void Draw(SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth)
Parameters
spriteBatch
SpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
destinationRectangle
RectangleA rectangular bound that defines the destination to render this TextureRegion into.
color
ColorThe color mask to apply when rendering this TextureRegion.
rotation
floatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
origin
Vector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
effects
SpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepth
floatThe layer depth to apply when rendering this TextureRegion.