Class NinePatchExtensions
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
SpriteBatchThe batch to draw with
texture
NinePatchThe nine patch to draw
destinationRectangle
RectangleFThe area that should be covered by this nine patch
color
ColorThe color to use
patchScale
floatThe 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
SpriteBatchThe batch to draw with
texture
NinePatchThe nine patch to draw
destinationRectangle
RectangleFThe area that should be covered by this nine patch
color
ColorThe color to use
rotation
floatThe rotation
origin
Vector2The origin position
effects
SpriteEffectsThe effects that the sprite should have
layerDepth
floatThe depth
patchScale
floatThe 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
SpriteBatchThe batch to draw with
texture
NinePatchThe nine patch to draw
destinationRectangle
RectangleThe area that should be covered by this nine patch
color
ColorThe color to use
patchScale
floatThe 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
SpriteBatchThe batch to draw with
texture
NinePatchThe nine patch to draw
destinationRectangle
RectangleThe area that should be covered by this nine patch
color
ColorThe color to use
rotation
floatThe rotation
origin
Vector2The origin position
effects
SpriteEffectsThe effects that the sprite should have
layerDepth
floatThe depth
patchScale
floatThe scale of each area of the nine patch