C# Class Nez.UI.NinePatchDrawable

The drawable sizes are set when the ninepatch is set, but they are separate values. Eg, {@link Drawable#getLeftWidth()} could be set to more than {@link NinePatch#getLeftWidth()} in order to provide more space on the left than actually exists in the ninepatch. The min size is set to the ninepatch total size by default. It could be set to the left+right and top+bottom, excluding the middle size, to allow the drawable to be sized down as small as possible.
Inheritance: IDrawable
Exibir arquivo Open project: prime31/Nez

Public Properties

Property Type Description
tintColor Color?

Public Methods

Method Description
NinePatchDrawable ( NinePatchSubtexture subtexture ) : System
NinePatchDrawable ( Subtexture subtexture, int left, int right, int top, int bottom ) : System
NinePatchDrawable ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int left, int right, int top, int bottom ) : System

creates a NinePatchDrawable using the full texture

draw ( Graphics graphics, float x, float y, float width, float height, Color color ) : void
newTintedDrawable ( Color tint ) : NinePatchDrawable

returns a new drawable with the tint color specified

setPadding ( float top, float bottom, float left, float right ) : void
setPadding ( int left, int right, int top, int bottom ) : void

sets the padding on the NinePatchSubtexture

Method Details

NinePatchDrawable() public method

public NinePatchDrawable ( NinePatchSubtexture subtexture ) : System
subtexture Nez.Textures.NinePatchSubtexture
return System

NinePatchDrawable() public method

public NinePatchDrawable ( Subtexture subtexture, int left, int right, int top, int bottom ) : System
subtexture Nez.Textures.Subtexture
left int
right int
top int
bottom int
return System

NinePatchDrawable() public method

creates a NinePatchDrawable using the full texture
public NinePatchDrawable ( Microsoft.Xna.Framework.Graphics.Texture2D texture, int left, int right, int top, int bottom ) : System
texture Microsoft.Xna.Framework.Graphics.Texture2D Texture.
left int Left.
right int Right.
top int Top.
bottom int Bottom.
return System

draw() public method

public draw ( Graphics graphics, float x, float y, float width, float height, Color color ) : void
graphics Graphics
x float
y float
width float
height float
color Color
return void

newTintedDrawable() public method

returns a new drawable with the tint color specified
public newTintedDrawable ( Color tint ) : NinePatchDrawable
tint Color Tint.
return NinePatchDrawable

setPadding() public method

public setPadding ( float top, float bottom, float left, float right ) : void
top float
bottom float
left float
right float
return void

setPadding() public method

sets the padding on the NinePatchSubtexture
public setPadding ( int left, int right, int top, int bottom ) : void
left int Left.
right int Right.
top int Top.
bottom int Bottom.
return void

Property Details

tintColor public_oe property

public Color? tintColor
return Color?