GeonBit.UI Documentation
DrawUtilsDrawSurface Method |
Draw a tiled texture with frame on destination rectangle.
This function will draw repeating frame parts + tile center parts to cover destination rect.
Namespace: GeonBit.UI
Assembly: GeonBit.UI (in GeonBit.UI.dll) Version: 1.0.0.0 (1.0.0.0)

C#
public virtual void DrawSurface( SpriteBatch spriteBatch, Texture2D texture, Rectangle destination, Vector2 textureFrameWidth, float scale = 1f, Nullable<Color> color = null, float frameScale = 1f )
Parameters
- spriteBatch
- Type: SpriteBatch
SpriteBatch to draw on. - texture
- Type: Texture2D
Texture to draw. - destination
- Type: Rectangle
Destination rectangle. - textureFrameWidth
- Type: Vector2
Frame width in percents relative to texture file size. For example, 0.1, 0.1 means the frame takes 10% of the texture file. - scale (Optional)
- Type: SystemSingle
Optional scale factor. - color (Optional)
- Type: SystemNullableColor
Optional color tint. - frameScale (Optional)
- Type: SystemSingle
Optional scale factor for the frame parts.
