Skip to content

IDrawContext.DrawNineSlice(ITexture, Rectangle, NineSliceBorder, Nullable) Method

Definition

Namespace: Brine2D.Rendering

Draw a nine-slice \(9\-patch\) texture scaled to the destination rectangle. The four corners are drawn at their natural texel size; edges and center are stretched.

C#
void DrawNineSlice(Brine2D.Rendering.ITexture texture, Brine2D.Core.Rectangle destination, Brine2D.Rendering.NineSliceBorder border, System.Nullable<Brine2D.Core.Color> tint=null);

Parameters

texture ITexture

The source texture.

destination Rectangle

Target rectangle in screen/world space.

border NineSliceBorder

Pixel insets defining the nine-slice cut lines in the source texture.

tint System.Nullable<Color>

Optional tint color \(null = white, no tint\).