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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
destinationRectangleRectangleA rectangular bound that defines the destination to render this TextureRegion into.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
positionVector2The x- and y-coordinate location to render this TextureRegion at.
colorColorThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
positionVector2The x- and y-coordinate location to render this TextureRegion at.
colorColorThe color mask to apply when rendering this TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
scalefloatThe amount of scaling to apply when rendering this TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
positionVector2The x- and y-coordinate location to render this TextureRegion at.
colorColorThe color mask to apply when rendering this TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
scaleVector2The amount of scaling to apply when rendering this TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepthfloatThe 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
spriteBatchSpriteBatchThe Microsoft.Xna.Framework.Graphics.SpriteBatch to use for rendering.
destinationRectangleRectangleA rectangular bound that defines the destination to render this TextureRegion into.
colorColorThe color mask to apply when rendering this TextureRegion.
rotationfloatThe amount of rotation, in radians, to apply when rendering this TextureRegion.
originVector2The x- and y-coordinate point of origin to apply when rendering this TextureRegion.
effectsSpriteEffectsThe Microsoft.Xna.Framework.Graphics.SpriteEffects to apply for horizontal and vertical axis flipping when rendering this TextureRegion.
layerDepthfloatThe layer depth to apply when rendering this TextureRegion.