40#ifndef _GLS_NINE_PATCH_H
41#define _GLS_NINE_PATCH_H
53#if( defined( GLSGEN_EXPORT_GLSNINEPATCH ) || defined( GLSGEN_IMPORT_GLSNINEPATCH ) || defined( GLS_EXPORT_GENERATED ) || defined( GLS_IMPORT_GENERATED ) ) \
54 && defined( _MSC_VER )
55# if defined( GLSGEN_EXPORT_GLSNINEPATCH ) || defined( GLS_EXPORT_GENERATED )
56# define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllexport )
58# define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllimport )
61# define GLSGEN_GLSNINEPATCH_EXPORT
66#define LIB_BASE_NAME "gls_nine_patch"
75 GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
76 GLS_NINE_PATCH_CENTER_VISIBLE,
78 GLS_NINE_PATCH_TEXTURE_EDGES,
80 GLS_NINE_PATCH_TEXTURE_POINTS,
82 GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
85#define GLS_NINE_PATCH_ARRAY_SIZE 16
90 friend class GlsNinePatchEditor;
97 DISTI_DEPRECATED(
"This identifier is forbidden by the C++ standard. Use BaseClass instead." )
virtual void PreDraw(const OpenGLMatrices ¤t, Culler &culler)
Definition: dynamic_array.h:79
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
Definition: gls_color.h:54
Definition: gls_glo_file.h:1243
Definition: gls_index_array.h:54
Definition: gls_nine_patch.h:103
Vector trc
The top right corner.
Definition: gls_nine_patch.h:107
Vector blc
The bottom left corner.
Definition: gls_nine_patch.h:105
Vector brc
The bottom right corner.
Definition: gls_nine_patch.h:106
Definition: gls_nine_patch.h:89
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL) DISTI_METHOD_OVERRIDE
virtual void PolygonMode(int mode) DISTI_METHOD_OVERRIDE
Definition: gls_nine_patch.h:167
void TextureTRC(const float x, const float y)
virtual void SetAvailableAttributes(unsigned int value) DISTI_METHOD_OVERRIDE
Vector _textureBLC
Definition: gls_nine_patch.h:431
void TextureBLC(const Vector &value)
Definition: gls_nine_patch.h:288
virtual void Draw() DISTI_METHOD_OVERRIDE
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array) DISTI_METHOD_OVERRIDE
float _textureEdge[4]
Definition: gls_nine_patch.h:439
Vector TextureTRC() const
Definition: gls_nine_patch.h:305
void BottomTextureEdge(float value)
Definition: gls_nine_patch.h:200
float LeftTextureEdge()
Definition: gls_nine_patch.h:229
void SetNeedsTextureRecalculate()
virtual DisplayObject * CloneObject(bool generateNames=false) DISTI_METHOD_OVERRIDE
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint) DISTI_METHOD_OVERRIDE
void TopVertexEdge(float value)
Definition: gls_nine_patch.h:217
Edge
Definition: gls_nine_patch.h:171
void CalculateTextureVerts()
void VertexEdge(Edge index, float value)
virtual void SetValue(int spec, va_list &args) DISTI_METHOD_OVERRIDE
void DrawPatches(bool texture)
void Height(const float &value)
void RightVertexEdge(float value)
Definition: gls_nine_patch.h:213
float _width
Definition: gls_nine_patch.h:433
void LeftVertexEdge(float value)
Definition: gls_nine_patch.h:209
float RightVertexEdge()
Definition: gls_nine_patch.h:249
virtual void Rotate(const Vector &orig, float angle, const Vector &axis) DISTI_METHOD_OVERRIDE
const Vector WidthVector() const
Definition: gls_nine_patch.h:275
const Vector HeightVector() const
Definition: gls_nine_patch.h:279
bool _guidesVisible
Definition: gls_nine_patch.h:449
void ReferenceTextureHeight(const unsigned int &value)
float RightTextureEdge()
Definition: gls_nine_patch.h:232
virtual Vertex * Vertices() DISTI_METHOD_OVERRIDE
virtual int PolygonMode() DISTI_METHOD_OVERRIDE
Definition: gls_nine_patch.h:161
Vertex _patchVerts[16]
Definition: gls_nine_patch.h:419
float _height
Definition: gls_nine_patch.h:434
GlsColor _objectColor
Definition: gls_nine_patch.h:450
void LeftTextureEdge(float value)
Definition: gls_nine_patch.h:188
void TextureTRC(const Vector &value)
Definition: gls_nine_patch.h:297
void TextureEdge(Edge index, float value)
virtual void Calculate(double time) DISTI_METHOD_OVERRIDE
static DisplayObject * CreateInstance()
bool _needsTextureRecalculate
Definition: gls_nine_patch.h:448
void CenterVisible(bool value)
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz) DISTI_METHOD_OVERRIDE
unsigned int _referenceTexWidth
Definition: gls_nine_patch.h:459
Vector _radii[2]
Definition: gls_nine_patch.h:428
virtual void CopyGeometry(DisplayObject *srcArg) DISTI_METHOD_OVERRIDE
float BottomTextureEdge()
Definition: gls_nine_patch.h:238
Vector TextureBLC() const
Definition: gls_nine_patch.h:301
void WidthVector(const Vector &v)
virtual const Vertex * GetPatchVerts()
void BottomVertexEdge(float value)
Definition: gls_nine_patch.h:221
GlsNinePatch(bool generateInstance=false)
bool _centerVisible
Definition: gls_nine_patch.h:446
float BottomVertexEdge()
Definition: gls_nine_patch.h:255
float TopVertexEdge()
Definition: gls_nine_patch.h:252
void ReferenceTextureWidth(const unsigned int &value)
void CalculateTextureResize(const int tw, const int th)
unsigned int ReferenceTextureWidth()
unsigned int _texHeight
Definition: gls_nine_patch.h:452
float Height() const
Definition: gls_nine_patch.h:317
float _vertexEdge[4]
Definition: gls_nine_patch.h:444
virtual float VertexEdge(Edge index)
void CalculatePatchVerts()
void CalculateRadiiUnit()
virtual const Vector * GetPatchTex()
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar) DISTI_METHOD_OVERRIDE
void TopTextureEdge(float value)
Definition: gls_nine_patch.h:196
virtual void CopyProperties(DisplayObject *src) DISTI_METHOD_OVERRIDE
Vector _patchTex[16]
Definition: gls_nine_patch.h:422
void HeightVector(const Vector &v)
unsigned int ReferenceTextureHeight()
void TextureBLC(const float x, const float y)
unsigned int _texWidth
Definition: gls_nine_patch.h:451
virtual void UpdateBoundingVolume() DISTI_METHOD_OVERRIDE
float LeftVertexEdge()
Definition: gls_nine_patch.h:246
void RightTextureEdge(float value)
Definition: gls_nine_patch.h:192
virtual GlsColor GetFillColor() DISTI_METHOD_OVERRIDE
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax) DISTI_METHOD_OVERRIDE
void Width(const float &value)
float TopTextureEdge()
Definition: gls_nine_patch.h:235
bool _needsRecalculate
Definition: gls_nine_patch.h:447
bool CenterVisible()
Definition: gls_nine_patch.h:259
Vector _textureTRC
Definition: gls_nine_patch.h:432
virtual void SetFillColor(const GlsColor &color) DISTI_METHOD_OVERRIDE
GlsNinePatch(const GlsNinePatch &that, const bool generateNames)
unsigned int _referenceTexHeight
Definition: gls_nine_patch.h:460
Vector _normal
Definition: gls_nine_patch.h:430
float Width() const
Definition: gls_nine_patch.h:321
virtual float TextureEdge(Edge index)
void SetNeedsRecalculate()
Definition: gls_vertex_array.h:60
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
float y
The Y component.
Definition: vertex.h:88
float x
The X component.
Definition: vertex.h:87
The disti::GLPolygon class. Implements Polygons.
Macros and helper code to determine what subset of C++11/14/17 is available.
#define DISTI_SPECIAL_MEM_FUN_DELETE
Macro to wrap function deletion, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:235
#define DISTI_DEPRECATED(msg)
Defines whether this compiler supports the C++14 deprecated attribute.
Definition: gls_cpp_lang_support.h:457
#define DISTI_METHOD_OVERRIDE
Macro to wrap the override keyword, removed on compilers that don't support it.
Definition: gls_cpp_lang_support.h:214
The disti::GlsDisplayList class.
#define GLS_EXPORT
Macro denoting which functions should be visible from the runtime library.
Definition: gls_include.h:52
The disti::GlsIndexArray class, for managing index buffers.
#define GLS_NINE_PATCH_ARRAY_SIZE
The number of vertices present in a nine patch.
Definition: gls_nine_patch.h:85
#define GLSGEN_GLSNINEPATCH_EXPORT
Provides support for creating DLLs.
Definition: gls_nine_patch.h:61
An object for managing vertices, texture coordinates, colors and normals for GLPolygon and other disp...
Force inclusion of the DirectShow library.
Definition: bmpimage.h:47
@ POLY_MODE_FILLED
Definition: display_types.h:86