DrawUtilsDrawImage Method |
Draw a simple image with texture and destination rectangle.
This function will stretch the texture to fit the destination rect.
Namespace:
GeonBit.UI
Assembly:
GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public virtual void DrawImage(
SpriteBatch spriteBatch,
Texture2D texture,
Rectangle destination,
Nullable<Color> color = null,
float scale = 1f,
Nullable<Rectangle> sourceRect = null
)
Parameters
- spriteBatch
- Type: SpriteBatch
SpriteBatch to draw on. - texture
- Type: Texture2D
Texture to draw. - destination
- Type: Rectangle
Destination rectangle. - color (Optional)
- Type: SystemNullableColor
Optional color tint. - scale (Optional)
- Type: SystemSingle
Optional scale factor. - sourceRect (Optional)
- Type: SystemNullableRectangle
Optional source rectangle to use.
See Also