![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
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.
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)
x1 | The left cap size. |
y1 | The bottom cap size. |
x2 | The right cap size. |
y2 | The top cap size. |
Set the cap coordinate start sizes. This method sets the left and bottom cap sizes. See SetCapCoordSize().
Boolean SetCapCoordSize1(Number x1, Number y1)
x1 | The left cap size. |
y1 | The bottom cap size. |
Set the cap coordinate stop sizes. This method sets the right and top cap sizes. See SetCapCoordSize().
Boolean SetCapCoordSize2(Number x2, Number y2)
x2 | The right cap size. |
y2 | The top cap size. |
Set the left cap coordinate size. See SetCapCoordSize().
Boolean SetCapCoordSizeX1(Number x1)
x1 | The left cap size. |
Set the bottom cap coordinate size. See SetCapCoordSize().
Boolean SetCapCoordSizeY1(Number y1)
y1 | The bottom cap size. |
Set the right cap coordinate size. See SetCapCoordSize().
Boolean SetCapCoordSizeX2(Number x2)
x2 | The right cap size. |
Set the top cap coordinate size. See SetCapCoordSize().
Boolean SetCapCoordSizeY2(Number y2)
y2 | The top cap size. |
Get the left cap coordinate size.
Number GetCapCoordSizeX1()
Get the bottom cap coordinate size.
Number GetCapCoordSizeY1()
Get the right cap coordinate size.
Number GetCapCoordSizeX2()
Get the top cap coordinate size.
Number GetCapCoordSizeY2()
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)
x1 | The left cap texture coordinate size. |
y1 | The bottom cap texture coordinate size. |
x2 | The right cap texture coordinate size. |
y2 | The top cap texture coordinate size. |
index | The index of the texture coordinate set. |
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)
x1 | The left cap texture coordinate size. |
y1 | The bottom cap texture coordinate size. |
index | The index of the texture coordinate set. |
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)
x2 | The right cap texture coordinate size. |
y2 | The top cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the left cap texture coordinate size.
Boolean SetCapTexCoordSizeX1(Number x1, Integer index)
x1 | The left cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the bottom cap texture coordinate size.
Boolean SetCapTexCoordSizeY1(Number y1, Integer index)
y1 | The bottom cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the right cap texture coordinate size.
Boolean SetCapTexCoordSizeX2(Number x2, Integer index)
x2 | The right cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the top cap texture coordinate size.
Boolean SetCapTexCoordSizeY2(Number y2, Integer index)
y2 | The top cap texture coordinate size. |
index | The index of the texture coordinate set. |
Get the left cap texture coordinate size.
Number GetCapTexCoordSizeX1(Integer index)
index | The index of the texture coordinate set. |
Get the bottom cap texture coordinate size.
Number GetCapTexCoordSizeY1(Integer index)
index | The index of the texture coordinate set. |
Get the right cap texture coordinate size.
Number GetCapTexCoordSizeX2(Integer index)
index | The index of the texture coordinate set. |
Get the top cap texture coordinate size.
Number GetCapTexCoordSizeY2(Integer index)
index | The index of the texture coordinate set. |
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)
enabled | If false, the center patch is not rendered. |
Check if the center patch is visible.
Boolean IsCenterPatchEnabled()