Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.INinePatch

The INinePatch property interface.

This interface represents a generic object that is divided up in three segments along both X and Y axes, creating a total of nine segments.

The first and last segment along each axis is defined with fixed size and texture coordinates, whereas the middle segment is stretched or shrunk depending on the actual plane frame size.

A nine patch is useful for defining the visual appearance of e.g. buttons on screen, which may have different actual sizes but should retain a common (unstretched) look along its corners and edges.

See the Graph::INinePatchPlaneGeometry and Graph::INinePatchPlaneSequenceGeometry node interfaces for further reference.


Table members

Methods


SetCapCoordSize(x1, y1, x2, y2)

Set all four of the cap coordinate sizes. This method sets all four of the cap sizes, i.e. left/right and bottom/top caps. Note that (x1+x2) and (y1+y2) should be less or equal to the object's actual frame size along the respective axis, defined via e.g. Graph::IPlaneGeometry::SetFrameSize().

Boolean SetCapCoordSize(Number x1, Number y1, Number x2, Number y2)

Parameters
x1The left cap size.
y1The bottom cap size.
x2The right cap size.
y2The top cap size.
Returns
Boolean true if successful.

SetCapCoordSize1(x1, y1)

Set the cap coordinate start sizes. This method sets the left and bottom cap sizes. See SetCapCoordSize().

Boolean SetCapCoordSize1(Number x1, Number y1)

Parameters
x1The left cap size.
y1The bottom cap size.
Returns
Boolean true if successful.

SetCapCoordSize2(x2, y2)

Set the cap coordinate stop sizes. This method sets the right and top cap sizes. See SetCapCoordSize().

Boolean SetCapCoordSize2(Number x2, Number y2)

Parameters
x2The right cap size.
y2The top cap size.
Returns
Boolean true if successful.

SetCapCoordSizeX1(x1)

Set the left cap coordinate size. See SetCapCoordSize().

Boolean SetCapCoordSizeX1(Number x1)

Parameters
x1The left cap size.
Returns
Boolean true if successful.

SetCapCoordSizeY1(y1)

Set the bottom cap coordinate size. See SetCapCoordSize().

Boolean SetCapCoordSizeY1(Number y1)

Parameters
y1The bottom cap size.
Returns
Boolean true if successful.

SetCapCoordSizeX2(x2)

Set the right cap coordinate size. See SetCapCoordSize().

Boolean SetCapCoordSizeX2(Number x2)

Parameters
x2The right cap size.
Returns
Boolean true if successful.

SetCapCoordSizeY2(y2)

Set the top cap coordinate size. See SetCapCoordSize().

Boolean SetCapCoordSizeY2(Number y2)

Parameters
y2The top cap size.
Returns
Boolean true if successful.

GetCapCoordSizeX1()

Get the left cap coordinate size.

Number GetCapCoordSizeX1()

Returns
Number The left cap size.

GetCapCoordSizeY1()

Get the bottom cap coordinate size.

Number GetCapCoordSizeY1()

Returns
Number The bottom cap size.

GetCapCoordSizeX2()

Get the right cap coordinate size.

Number GetCapCoordSizeX2()

Returns
Number The right cap size.

GetCapCoordSizeY2()

Get the top cap coordinate size.

Number GetCapCoordSizeY2()

Returns
Number The top cap size.

SetCapTexCoordSize(x1, y1, x2, y2, index)

Set all four of the cap texture coordinate sizes. This method sets all four of the texture coordinate cap sizes, i.e. left/right and bottom/top caps.

Boolean SetCapTexCoordSize(Number x1, Number y1, Number x2, Number y2, Integer index)

Parameters
x1The left cap texture coordinate size.
y1The bottom cap texture coordinate size.
x2The right cap texture coordinate size.
y2The top cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSize1(x1, y1, index)

Set the cap texture coordinate start sizes. This method sets the left and bottom texture coordinate cap sizes.

Boolean SetCapTexCoordSize1(Number x1, Number y1, Integer index)

Parameters
x1The left cap texture coordinate size.
y1The bottom cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSize2(x2, y2, index)

Set the cap texture coordinate stop sizes. This method sets the left and bottom texture coordinate cap sizes.

Boolean SetCapTexCoordSize2(Number x2, Number y2, Integer index)

Parameters
x2The right cap texture coordinate size.
y2The top cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSizeX1(x1, index)

Set the left cap texture coordinate size.

Boolean SetCapTexCoordSizeX1(Number x1, Integer index)

Parameters
x1The left cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSizeY1(y1, index)

Set the bottom cap texture coordinate size.

Boolean SetCapTexCoordSizeY1(Number y1, Integer index)

Parameters
y1The bottom cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSizeX2(x2, index)

Set the right cap texture coordinate size.

Boolean SetCapTexCoordSizeX2(Number x2, Integer index)

Parameters
x2The right cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetCapTexCoordSizeY2(y2, index)

Set the top cap texture coordinate size.

Boolean SetCapTexCoordSizeY2(Number y2, Integer index)

Parameters
y2The top cap texture coordinate size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

GetCapTexCoordSizeX1(index)

Get the left cap texture coordinate size.

Number GetCapTexCoordSizeX1(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The left cap texture coordinate size.

GetCapTexCoordSizeY1(index)

Get the bottom cap texture coordinate size.

Number GetCapTexCoordSizeY1(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The bottom cap texture coordinate size.

GetCapTexCoordSizeX2(index)

Get the right cap texture coordinate size.

Number GetCapTexCoordSizeX2(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The right cap texture coordinate size.

GetCapTexCoordSizeY2(index)

Get the top cap texture coordinate size.

Number GetCapTexCoordSizeY2(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The top cap texture coordinate size.

SetCenterPatchEnabled(enabled)

Enable/disable rendering of the center patch. To avoid excessive overdraw when e.g. only a frame with transparent center is to be rendered, the center patch can be set invisible using this method.

Boolean SetCenterPatchEnabled(Boolean enabled)

Parameters
enabledIf false, the center patch is not rendered.
Returns
Boolean true if successful.

IsCenterPatchEnabled()

Check if the center patch is visible.

Boolean IsCenterPatchEnabled()

Returns
Boolean true if visible.