Method | Description | |
---|---|---|
Begin ( SpriteSortMode sortMode = SpriteSortMode.Deferred, |
Begins a new sprite and text batch with the specified render state. This method uses optional parameters.The Begin Begin should be called before drawing commands, and you cannot call it again before subsequent End. |
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, System.Color color ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, System.Color color ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, SpriteEffects effects, float layerDepth ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, System.Color color ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, System.Vector2 scale, SpriteEffects effects, float layerDepth ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, float scale, SpriteEffects effects, float layerDepth ) : void |
Submit a sprite for drawing in the current batch.
|
|
Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position = null, Rectangle destinationRectangle = null, Rectangle sourceRectangle = null, System.Vector2 origin = null, float rotation = 0f, System.Vector2 scale = null, System.Color color = null, SpriteEffects effects = SpriteEffects.None, float layerDepth = 0f ) : void |
Submit a sprite for drawing in the current batch. This overload uses optional parameters. This overload requires only one of position and destinationRectangle been used. |
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
DrawString ( |
Submit a text string of sprites for drawing in the current batch.
|
|
End ( ) : void |
Flushes all batched text and sprites to the screen. This command should be called after Begin and drawing commands. |
|
SpriteBatch ( Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice ) : System |
Constructs a SpriteBatch.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Immediately releases the unmanaged resources used by this object.
|
Method | Description | |
---|---|---|
CheckValid ( |
||
CheckValid ( |
||
CheckValid ( Microsoft.Xna.Framework.Graphics.Texture2D texture ) : void | ||
DrawInternal ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector4 destinationRectangle, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, SpriteEffects effect, float depth, bool autoFlush ) : void | ||
FlushIfNeeded ( ) : void | ||
Setup ( ) : void |
public Begin ( SpriteSortMode sortMode = SpriteSortMode.Deferred, |
||
sortMode | SpriteSortMode | The drawing order for sprite and text drawing. |
blendState | State of the blending. Uses |
|
samplerState | State of the sampler. Uses |
|
depthStencilState | State of the depth-stencil buffer. Uses |
|
rasterizerState | State of the rasterization. Uses |
|
effect | A custom |
|
transformMatrix | System.Matrix | An optional matrix used to transform the sprite geometry. Uses |
return | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, System.Color color ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
destinationRectangle | Rectangle | The drawing bounds on screen. |
color | System.Color | A color mask. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, System.Color color ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
destinationRectangle | Rectangle | The drawing bounds on screen. |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
color | System.Color | A color mask. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, Rectangle destinationRectangle, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, SpriteEffects effects, float layerDepth ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
destinationRectangle | Rectangle | The drawing bounds on screen. |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
color | System.Color | A color mask. |
rotation | float | A rotation of this sprite. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this sprite. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, System.Color color ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
position | System.Vector2 | The drawing location on screen. |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
color | System.Color | A color mask. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, System.Vector2 scale, SpriteEffects effects, float layerDepth ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
position | System.Vector2 | The drawing location on screen. |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
color | System.Color | A color mask. |
rotation | float | A rotation of this sprite. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | System.Vector2 | A scaling of this sprite. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this sprite. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position, Rectangle sourceRectangle, System.Color color, float rotation, System.Vector2 origin, float scale, SpriteEffects effects, float layerDepth ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
position | System.Vector2 | The drawing location on screen. |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
color | System.Color | A color mask. |
rotation | float | A rotation of this sprite. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | float | A scaling of this sprite. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this sprite. |
return | void |
public Draw ( Microsoft.Xna.Framework.Graphics.Texture2D texture, System.Vector2 position = null, Rectangle destinationRectangle = null, Rectangle sourceRectangle = null, System.Vector2 origin = null, float rotation = 0f, System.Vector2 scale = null, System.Color color = null, SpriteEffects effects = SpriteEffects.None, float layerDepth = 0f ) : void | ||
texture | Microsoft.Xna.Framework.Graphics.Texture2D | A texture. |
position | System.Vector2 | The drawing location on screen or null if |
destinationRectangle | Rectangle | The drawing bounds on screen or null if |
sourceRectangle | Rectangle | An optional region on the texture which will be rendered. If null - draws full texture. |
origin | System.Vector2 | An optional center of rotation. Uses |
rotation | float | An optional rotation of this sprite. 0 by default. |
scale | System.Vector2 | An optional scale vector. Uses |
color | System.Color | An optional color mask. Uses |
effects | SpriteEffects | The optional drawing modificators. |
layerDepth | float | An optional depth of the layer of this sprite. 0 by default. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | StringBuilder | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | StringBuilder | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
rotation | float | A rotation of this string. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | System.Vector2 | A scaling of this string. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this string. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | StringBuilder | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
rotation | float | A rotation of this string. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | float | A scaling of this string. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this string. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | string | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | string | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
rotation | float | A rotation of this string. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | System.Vector2 | A scaling of this string. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this string. |
return | void |
public DrawString ( |
||
spriteFont | A font. | |
text | string | The text which will be drawn. |
position | System.Vector2 | The drawing location on screen. |
color | System.Color | A color mask. |
rotation | float | A rotation of this string. |
origin | System.Vector2 | Center of the rotation. 0,0 by default. |
scale | float | A scaling of this string. |
effects | SpriteEffects | Modificators for drawing. Can be combined. |
layerDepth | float | A depth of the layer of this string. |
return | void |
public SpriteBatch ( Microsoft.Xna.Framework.Graphics.GraphicsDevice graphicsDevice ) : System | ||
graphicsDevice | Microsoft.Xna.Framework.Graphics.GraphicsDevice | The |
return | System |