Click or drag to resize
DigitalRuneRenderTransformDraw Method (SpriteBatch, Texture2D, RectangleF, NullableRectangle, Color)
Transforms a sprite and adds it to a batch of sprites for rendering using the specified texture, position, source rectangle and color.

Namespace: DigitalRune.Game.UI.Rendering
Assembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.8.0.0 (1.8.0.14553)
Syntax
public void Draw(
	SpriteBatch spriteBatch,
	Texture2D texture,
	RectangleF destinationRectangle,
	Nullable<Rectangle> sourceRectangle,
	Color color
)

Parameters

spriteBatch
Type: SpriteBatch
The sprite batch for rendering.
texture
Type: Texture2D
The texture.
destinationRectangle
Type: DigitalRune.Game.UIRectangleF
A rectangle that specifies (in screen coordinates) the destination for drawing the sprite. If this rectangle is not the same size as the source rectangle, the sprite will be scaled to fit.
sourceRectangle
Type: SystemNullableRectangle
A rectangle that specifies (in texels) the source texels from a texture. Use to draw the entire texture.
color
Type: Color
The color to tint a sprite. Use white for full color with no tinting.
Exceptions
ExceptionCondition
ArgumentNullExceptionspriteBatch or texture is .
See Also