![]() |
Murl Engine API
Version 2018.3
|
The INinePatch property interface. More...
#include <murl_graph_i_nine_patch.h>
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.
Public Member Functions | |
virtual Bool | SetCapCoordSize (Real x1, Real y1, Real x2, Real y2)=0 |
Set all four of the cap coordinate sizes. More... | |
virtual Bool | SetCapCoordSize1 (Real x1, Real y1)=0 |
Set the cap coordinate start sizes. More... | |
virtual Bool | SetCapCoordSize2 (Real x2, Real y2)=0 |
Set the cap coordinate stop sizes. More... | |
virtual Bool | SetCapCoordSizeX1 (Real x1)=0 |
Set the left cap coordinate size. More... | |
virtual Bool | SetCapCoordSizeY1 (Real y1)=0 |
Set the bottom cap coordinate size. More... | |
virtual Bool | SetCapCoordSizeX2 (Real x2)=0 |
Set the right cap coordinate size. More... | |
virtual Bool | SetCapCoordSizeY2 (Real y2)=0 |
Set the top cap coordinate size. More... | |
virtual Real | GetCapCoordSizeX1 () const =0 |
Get the left cap coordinate size. More... | |
virtual Real | GetCapCoordSizeY1 () const =0 |
Get the bottom cap coordinate size. More... | |
virtual Real | GetCapCoordSizeX2 () const =0 |
Get the right cap coordinate size. More... | |
virtual Real | GetCapCoordSizeY2 () const =0 |
Get the top cap coordinate size. More... | |
virtual Bool | SetCapTexCoordSize (Real x1, Real y1, Real x2, Real y2, UInt32 index)=0 |
Set all four of the cap texture coordinate sizes. More... | |
virtual Bool | SetCapTexCoordSize1 (Real x1, Real y1, UInt32 index)=0 |
Set the cap texture coordinate start sizes. More... | |
virtual Bool | SetCapTexCoordSize2 (Real x2, Real y2, UInt32 index)=0 |
Set the cap texture coordinate stop sizes. More... | |
virtual Bool | SetCapTexCoordSizeX1 (Real x1, UInt32 index)=0 |
Set the left cap texture coordinate size. More... | |
virtual Bool | SetCapTexCoordSizeY1 (Real y1, UInt32 index)=0 |
Set the bottom cap texture coordinate size. More... | |
virtual Bool | SetCapTexCoordSizeX2 (Real x2, UInt32 index)=0 |
Set the right cap texture coordinate size. More... | |
virtual Bool | SetCapTexCoordSizeY2 (Real y2, UInt32 index)=0 |
Set the top cap texture coordinate size. More... | |
virtual Real | GetCapTexCoordSizeX1 (UInt32 index) const =0 |
Get the left cap texture coordinate size. More... | |
virtual Real | GetCapTexCoordSizeY1 (UInt32 index) const =0 |
Get the bottom cap texture coordinate size. More... | |
virtual Real | GetCapTexCoordSizeX2 (UInt32 index) const =0 |
Get the right cap texture coordinate size. More... | |
virtual Real | GetCapTexCoordSizeY2 (UInt32 index) const =0 |
Get the top cap texture coordinate size. More... | |
virtual Bool | SetCenterPatchEnabled (Bool enabled)=0 |
Enable/disable rendering of the center patch. More... | |
virtual Bool | IsCenterPatchEnabled () const =0 |
Check if the center patch is visible. More... | |
|
pure virtual |
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().
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().
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().
x2 | The right cap size. |
y2 | The top cap size. |
Set the left cap coordinate size.
See SetCapCoordSize().
x1 | The left cap size. |
Set the bottom cap coordinate size.
See SetCapCoordSize().
y1 | The bottom cap size. |
Set the right cap coordinate size.
See SetCapCoordSize().
x2 | The right cap size. |
Set the top cap coordinate size.
See SetCapCoordSize().
y2 | The top cap size. |
|
pure virtual |
Get the left cap coordinate size.
|
pure virtual |
Get the bottom cap coordinate size.
|
pure virtual |
Get the right cap coordinate size.
|
pure virtual |
Get the top cap coordinate size.
|
pure virtual |
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.
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. |
|
pure virtual |
Set the cap texture coordinate start sizes.
This method sets the left and bottom texture coordinate cap sizes.
x1 | The left cap texture coordinate size. |
y1 | The bottom cap texture coordinate size. |
index | The index of the texture coordinate set. |
|
pure virtual |
Set the cap texture coordinate stop sizes.
This method sets the left and bottom texture coordinate cap sizes.
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.
x1 | The left cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the bottom cap texture coordinate size.
y1 | The bottom cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the right cap texture coordinate size.
x2 | The right cap texture coordinate size. |
index | The index of the texture coordinate set. |
Set the top cap texture coordinate size.
y2 | The top cap texture coordinate size. |
index | The index of the texture coordinate set. |
Get the left cap texture coordinate size.
index | The index of the texture coordinate set. |
Get the bottom cap texture coordinate size.
index | The index of the texture coordinate set. |
Get the right cap texture coordinate size.
index | The index of the texture coordinate set. |
Get the top cap texture coordinate size.
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.
enabled | If false, the center patch is not rendered. |
|
pure virtual |
Check if the center patch is visible.