SpriteBatch Class (Microsoft.Xna.Framework.Graphics)

Helper class for drawing text strings and sprites in one or more optimized batches.
System.Object
   Microsoft.Xna.Framework.Graphics.GraphicsResource
      Microsoft.Xna.Framework.Graphics.SpriteBatch

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public class SpriteBatch : GraphicsResource

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The SpriteBatch type exposes the following members.

  Platforms Name Description
SpriteBatch(GraphicsDevice) Constructs a SpriteBatch
SpriteBatch(GraphicsDevice, int) Constructs a SpriteBatch
Top
  Platforms Name Description
GraphicsDevice  (Inherited from GraphicsResource.)
IsDisposed  (Inherited from GraphicsResource.)
Name  (Inherited from GraphicsResource.)
Tag  (Inherited from GraphicsResource.)
Top
  Platforms Name Description
Begin Begins a new sprite and text batch with the specified render state. 
Dispose()  (Inherited from GraphicsResource.)
Dispose(bool) Immediately releases the unmanaged resources used by this object. (Overrides GraphicsResource.Dispose().)
Draw(Texture2D, Vector2, Nullable<Rectangle>, Color, float, Vector2, Vector2, SpriteEffects, float) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Vector2, Nullable<Rectangle>, Color, float, Vector2, float, SpriteEffects, float) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Rectangle, Nullable<Rectangle>, Color, float, Vector2, SpriteEffects, float) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Vector2, Nullable<Rectangle>, Color) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Rectangle, Nullable<Rectangle>, Color) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Vector2, Color) Submit a sprite for drawing in the current batch. 
Draw(Texture2D, Rectangle, Color) Submit a sprite for drawing in the current batch. 
DrawString(SpriteFont, string, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float) Submit a text string of sprites for drawing in the current batch. 
DrawString(SpriteFont, StringBuilder, Vector2, Color, float, Vector2, Vector2, SpriteEffects, float) Submit a text string of sprites for drawing in the current batch. 
DrawString(SpriteFont, StringBuilder, Vector2, Color, float, Vector2, float, SpriteEffects, float) Submit a text string of sprites for drawing in the current batch. 
DrawString(SpriteFont, string, Vector2, Color) Submit a text string of sprites for drawing in the current batch. 
DrawString(SpriteFont, string, Vector2, Color, float, Vector2, float, SpriteEffects, float) Submit a text string of sprites for drawing in the current batch. 
DrawString(SpriteFont, StringBuilder, Vector2, Color) Submit a text string of sprites for drawing in the current batch. 
End Flushes all batched text and sprites to the screen. 
Finalize  (Inherited from GraphicsResource.)
GraphicsDeviceResetting Called before the device is reset. Allows graphics resources to invalidate their state so they can be recreated after the device reset. Warning: This may be called after a call to Dispose() up until the resource is garbage collected. (Inherited from GraphicsResource.)
ToString  (Inherited from GraphicsResource.)
Top
  Platforms Name Description
Disposing  (Inherited from GraphicsResource.)
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web