Table of Contents

Class NinePatchExtensions

Namespace
MLEM.Textures
Assembly
MLEM.dll

A set of extensions that allow for NinePatch rendering

public static class NinePatchExtensions
Inheritance
NinePatchExtensions
Inherited Members

Methods

Draw(SpriteBatch, NinePatch, RectangleF, Color, float)

Draws a nine patch area using the given sprite batch

public static void Draw(this SpriteBatch batch, NinePatch texture, RectangleF destinationRectangle, Color color, float patchScale = 1)

Parameters

batch SpriteBatch

The batch to draw with

texture NinePatch

The nine patch to draw

destinationRectangle RectangleF

The area that should be covered by this nine patch

color Color

The color to use

patchScale float

The scale of each area of the nine patch

Draw(SpriteBatch, NinePatch, RectangleF, Color, float, Vector2, SpriteEffects, float, float)

Draws a nine patch area using the given sprite batch

public static void Draw(this SpriteBatch batch, NinePatch texture, RectangleF destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth, float patchScale = 1)

Parameters

batch SpriteBatch

The batch to draw with

texture NinePatch

The nine patch to draw

destinationRectangle RectangleF

The area that should be covered by this nine patch

color Color

The color to use

rotation float

The rotation

origin Vector2

The origin position

effects SpriteEffects

The effects that the sprite should have

layerDepth float

The depth

patchScale float

The scale of each area of the nine patch

Draw(SpriteBatch, NinePatch, Rectangle, Color, float)

Draws a nine patch area using the given sprite batch

public static void Draw(this SpriteBatch batch, NinePatch texture, Rectangle destinationRectangle, Color color, float patchScale = 1)

Parameters

batch SpriteBatch

The batch to draw with

texture NinePatch

The nine patch to draw

destinationRectangle Rectangle

The area that should be covered by this nine patch

color Color

The color to use

patchScale float

The scale of each area of the nine patch

Draw(SpriteBatch, NinePatch, Rectangle, Color, float, Vector2, SpriteEffects, float, float)

Draws a nine patch area using the given sprite batch

public static void Draw(this SpriteBatch batch, NinePatch texture, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, SpriteEffects effects, float layerDepth, float patchScale = 1)

Parameters

batch SpriteBatch

The batch to draw with

texture NinePatch

The nine patch to draw

destinationRectangle Rectangle

The area that should be covered by this nine patch

color Color

The color to use

rotation float

The rotation

origin Vector2

The origin position

effects SpriteEffects

The effects that the sprite should have

layerDepth float

The depth

patchScale float

The scale of each area of the nine patch