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
batchSpriteBatchThe batch to draw with
textureNinePatchThe nine patch to draw
destinationRectangleRectangleFThe area that should be covered by this nine patch
colorColorThe color to use
patchScalefloatThe 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
batchSpriteBatchThe batch to draw with
textureNinePatchThe nine patch to draw
destinationRectangleRectangleFThe area that should be covered by this nine patch
colorColorThe color to use
rotationfloatThe rotation
originVector2The origin position
effectsSpriteEffectsThe effects that the sprite should have
layerDepthfloatThe depth
patchScalefloatThe 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
batchSpriteBatchThe batch to draw with
textureNinePatchThe nine patch to draw
destinationRectangleRectangleThe area that should be covered by this nine patch
colorColorThe color to use
patchScalefloatThe 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
batchSpriteBatchThe batch to draw with
textureNinePatchThe nine patch to draw
destinationRectangleRectangleThe area that should be covered by this nine patch
colorColorThe color to use
rotationfloatThe rotation
originVector2The origin position
effectsSpriteEffectsThe effects that the sprite should have
layerDepthfloatThe depth
patchScalefloatThe scale of each area of the nine patch