NinePatch

Render a resizable repeated sprite with borders. (ex: bubble speech).

Constructors

this
this()

Default ctor

this
this(NinePatch ninePatch)

Copy ctor

this
this(Drawable drawable_, Vec4i clip_, int top_, int bottom_, int left_, int right_)

Ctor

Members

Functions

draw
void draw(Vec2f position)

Render the NinePatch in this position.

fit
void fit(Vec2f sz)

Set the ninepatch's size to fit inside the specified size.

Properties

bottom
int bottom [@property getter]
int bottom [@property setter]

The bottom border offset.

clip
Vec4i clip [@property getter]
Vec4i clip [@property setter]

Drawable's region used.

drawable
Drawable drawable [@property getter]
Drawable drawable [@property setter]

The drawable used to render.

left
int left [@property getter]
int left [@property setter]

The left border offset.

right
int right [@property getter]
int right [@property setter]

The right border offset.

size
Vec2f size [@property getter]
Vec2f size [@property setter]

Size of the render zone. \ Changing the value allocate a new Canvas (don't do it too often).

top
int top [@property getter]
int top [@property setter]

The top border offset.

Variables

alpha
float alpha;

Alpha

anchor
Vec2f anchor;

Relative center of the ninepatch.

angle
float angle;

Angle in which the ninepatch will be rendered.

blend
Blend blend;

Blending algorithm.

color
Color color;

Color added to the ninepatch.

flip
Flip flip;

Mirroring property.

Meta