GL Studio API
gls_nine_patch.h
Go to the documentation of this file.
1 /*! \file
2  \brief The disti::GlsNinePatch class.
3 
4  \par Copyright Information
5 
6  Copyright (c) 2015 by The DiSTI Corporation.<br>
7  11301 Corporate Blvd., Suite 100<br>
8  Orlando, Florida 32817<br>
9  USA<br>
10  <br>
11  All rights reserved.<br>
12 
13  This Software contains proprietary trade secrets of DiSTI and may not be
14 reproduced, in whole or part, in any form, or by any means of electronic,
15 mechanical, or otherwise, without the written permission of DiSTI. Said
16 permission may be derived through the purchase of applicable DiSTI product
17 licenses which detail the distribution rights of this content and any
18 Derivative Works based on this or other copyrighted DiSTI Software.
19 
20  NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21 AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22 PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23 AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24 IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25 PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26 
27  LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28 IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29 INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30 DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31 INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32 INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33 OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34 EXCEED FIVE DOLLARS (US$5.00).
35 
36  The aforementioned terms and restrictions are governed by the laws of the
37 State of Florida and the United States of America.
38 
39 */
40 #ifndef _GLS_NINE_PATCH_H
41 #define _GLS_NINE_PATCH_H
42 #include "glpolygon.h"
43 #include "gls_cpp_lang_support.h"
44 
45 #ifdef GLES
46 #include "gls_vertex_array.h"
47 #include "gls_index_array.h"
48 #else
49 #include "gls_display_list.h"
50 #endif
51 
52 //////////////////// Provides support for creating DLLs ////////////////////////
53 #if (defined(GLSGEN_EXPORT_GLSNINEPATCH) || \
54  defined(GLSGEN_IMPORT_GLSNINEPATCH) || \
55  defined(GLS_EXPORT_GENERATED) || \
56  defined(GLS_IMPORT_GENERATED)) \
57  && defined(_MSC_VER)
58 # if defined(GLSGEN_EXPORT_GLSNINEPATCH) || defined(GLS_EXPORT_GENERATED)
59 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec(dllexport)
60 # else
61 # define GLSGEN_GLSNINEPATCH_EXPORT __declspec(dllimport)
62 # endif
63 #else
64 # define GLSGEN_GLSNINEPATCH_EXPORT
65 #endif
66 ///////////////////////////////////////////////////////////////////////////////
67 
68 #define LIB_BASE_NAME "gls_nine_patch"
69 #include "gls_auto_lib.h"
70 #undef LIB_BASE_NAME
71 
72 namespace disti
73 {
74 
75 // SetValue enumerations
76 enum {
77  GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER+1,
78  GLS_NINE_PATCH_CENTER_VISIBLE,
79  GLS_NINE_PATCH_EDGES,
80  GLS_NINE_PATCH_TEXTURE_EDGES,
81  GLS_NINE_PATCH_RADII,
82  GLS_NINE_PATCH_TEXTURE_POINTS,
83  GLS_NINE_PATCH_COLOR,
84  GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
85  };
86 
87 #define GLS_NINE_PATCH_ARRAY_SIZE 16
88 
89 /** Runtime implementation of a GlsNinePatch */
90 class GlsNinePatch : public GLPolygon
91 {
92  friend class GlsNinePatchEditor;
93 
94 private:
95  GlsNinePatch& operator=( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
96  GlsNinePatch( const GlsNinePatch& ) DISTI_SPECIAL_MEM_FUN_DELETE;
97 
98 public:
99  typedef GLPolygon _BaseClass;
100 
101  class Rect3D
102  {
103  public:
104  Vector blc,brc,trc;
105 
106  Rect3D() {};
107  };
108 
109 
110  ///////////////////////////////////////////////////////////////////////////////////////////////
111  //
112  // DisplayObject overrides
113  //
114  ///////////////////////////////////////////////////////////////////////////////////////////////
115  virtual GLSGEN_GLSNINEPATCH_EXPORT void Scale(float px, float py, float pz, Vertex *anchor, int handleBar);
116  virtual GLSGEN_GLSNINEPATCH_EXPORT void Rotate(const Vector &orig,float angle,const Vector &axis);
117  virtual GLSGEN_GLSNINEPATCH_EXPORT bool Hit(float x,float y,float z,float scale, const Vector& directionVector,Vector *collisionPoint);
118  virtual GLSGEN_GLSNINEPATCH_EXPORT Vertex* Vertices();
119  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetExtents(float &minx,float &miny,float &minz, float &maxx,float &maxy,float &maxz);
120  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetTransformedExtents(Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax);
121 
122  virtual GLSGEN_GLSNINEPATCH_EXPORT void UpdateBoundingVolume(void);
123 
124  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetValue(int spec,va_list &args);
125  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch(bool generateInstance=false);
126  GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( const GlsNinePatch& that, const bool generateNames );
127  virtual GLSGEN_GLSNINEPATCH_EXPORT ~GlsNinePatch();
128  static GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CreateInstance();
129  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetAvailableAttributes(unsigned int value);
130  virtual GLSGEN_GLSNINEPATCH_EXPORT DisplayObject* CloneObject(bool generateNames = false);
131  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyProperties(DisplayObject *src);
132  virtual GLSGEN_GLSNINEPATCH_EXPORT void CopyGeometry(DisplayObject *srcArg);
133 #ifndef GLES
134  virtual GLSGEN_GLSNINEPATCH_EXPORT InterfaceListType* GetCppInterfaceDescription(InterfaceListType* addToThisList= NULL );
135  virtual GLSGEN_GLSNINEPATCH_EXPORT void GetCppInterfaceDescriptionFree(InterfaceListType* array);
136 #endif
137 
138  virtual GLSGEN_GLSNINEPATCH_EXPORT void Calculate(double time);
139 
140 #ifdef GLES
141  virtual GLSGEN_GLSNINEPATCH_EXPORT void PreDraw(const OpenGLMatrices& current, Culler& culler);
142 #endif
143  virtual GLSGEN_GLSNINEPATCH_EXPORT void Draw(void);
144  virtual GLSGEN_GLSNINEPATCH_EXPORT void SetFillColor(const glsColor &color);
145  virtual GLSGEN_GLSNINEPATCH_EXPORT glsColor GetFillColor(void);
146 
147  /** Gets the polygon drawing mode for this object
148  * \return The polygon drawing mode for this object
149  * \sa PolygonMode_e
150  */
151  virtual GLSGEN_GLSNINEPATCH_EXPORT int PolygonMode(void) {return POLY_MODE_FILLED;}
152 
153  /** Sets the polygon drawing mode for this object
154  * \param mode The new polygon drawing mode for this object
155  * \sa PolygonMode_e
156  */
157  virtual GLSGEN_GLSNINEPATCH_EXPORT void PolygonMode(int mode) {} // do nothing
158 
159  typedef enum
160  {
161  FIRST=0,
162  LEFT=0,
163  RIGHT=1,
164  TOP=2,
165  BOTTOM=3,
166  COUNT=4
167  } Edge;
168 
169  /** Set's the texture edge at enum specified by index to the value specified as pixel units.
170  * \param index Refers to the texture edge enumeration that will be modified
171  * \param value The pixel unit(s) assigned to the specificed texture edge enumeration
172  */
173  GLSGEN_GLSNINEPATCH_EXPORT void TextureEdge(Edge index,float value);
174  GLSGEN_GLSNINEPATCH_EXPORT void LeftTextureEdge( float value) { TextureEdge( LEFT, value ); }
175  GLSGEN_GLSNINEPATCH_EXPORT void RightTextureEdge( float value) { TextureEdge( RIGHT, value ); }
176  GLSGEN_GLSNINEPATCH_EXPORT void TopTextureEdge( float value) { TextureEdge( TOP, value ); }
177  GLSGEN_GLSNINEPATCH_EXPORT void BottomTextureEdge( float value) { TextureEdge( BOTTOM, value ); }
178 
179  /** Set's the vertex edge at enum specified by index to the value specified as logical units.
180  * \param index refers to the vertex edge enumeration that will be modified
181  * \param value is the logical unit(s) assigned to the specificed vertex edge enumeration
182  */
183  GLSGEN_GLSNINEPATCH_EXPORT void VertexEdge(Edge index,float value);
184  GLSGEN_GLSNINEPATCH_EXPORT void LeftVertexEdge( float value) { VertexEdge( LEFT, value ); }
185  GLSGEN_GLSNINEPATCH_EXPORT void RightVertexEdge( float value) { VertexEdge( RIGHT, value ); }
186  GLSGEN_GLSNINEPATCH_EXPORT void TopVertexEdge( float value) { VertexEdge( TOP, value ); }
187  GLSGEN_GLSNINEPATCH_EXPORT void BottomVertexEdge( float value) { VertexEdge( BOTTOM, value ); }
188 
189  /** Return the value in pixel units of the TextureEdge given at enumeration specified by index
190  * \param index refers to the edge enumeration that the value will be gotten from
191  * \return A float value in pixel units that corresponds with the respective VertexEdge index/enum.
192  */
193  virtual GLSGEN_GLSNINEPATCH_EXPORT float TextureEdge(Edge index);
194  GLSGEN_GLSNINEPATCH_EXPORT float LeftTextureEdge() { return TextureEdge( LEFT ); }
195  GLSGEN_GLSNINEPATCH_EXPORT float RightTextureEdge() { return TextureEdge( RIGHT ); }
196  GLSGEN_GLSNINEPATCH_EXPORT float TopTextureEdge() { return TextureEdge( TOP ); }
197  GLSGEN_GLSNINEPATCH_EXPORT float BottomTextureEdge() { return TextureEdge( BOTTOM ); }
198 
199  /** Return the value in logical units at the edge enumeration specified by index
200  * \param index refers to the edge enumeration
201  * \return A float value in logical units that corresponds with the respective TextureEdge index/enum.
202  */
203  virtual GLSGEN_GLSNINEPATCH_EXPORT float VertexEdge(Edge index);
204  GLSGEN_GLSNINEPATCH_EXPORT float LeftVertexEdge() { return VertexEdge( LEFT ); }
205  GLSGEN_GLSNINEPATCH_EXPORT float RightVertexEdge() { return VertexEdge( RIGHT ); }
206  GLSGEN_GLSNINEPATCH_EXPORT float TopVertexEdge() { return VertexEdge( TOP ); }
207  GLSGEN_GLSNINEPATCH_EXPORT float BottomVertexEdge() { return VertexEdge( BOTTOM ); }
208 
209  /** Getter function to determine whether or not the center will be drawn
210  * \return True being returned lets the use know that the Center of the NinePatch is visible.
211  */
212  GLSGEN_GLSNINEPATCH_EXPORT bool CenterVisible() { return _centerVisible; }
213 
214  GLSGEN_GLSNINEPATCH_EXPORT void CenterVisible(bool value);
215 
216  /** Sets the radii of the width vector in logical units
217  * \param v Will set the radii's width row's logical values of the glsNinePatch object
218  */
219  GLSGEN_GLSNINEPATCH_EXPORT void WidthVector(const Vector &v);
220 
221  /** Sets the radii of the height vector in logical units
222  * \param v Will set the radii's height row's logical values of the glsNinePatch object
223  */
224  GLSGEN_GLSNINEPATCH_EXPORT void HeightVector(const Vector &v);
225 
226  /** Gets the radii of the width vector in logical units.
227  * \return The width of the NinePatch as a Vector.
228  */
229  GLSGEN_GLSNINEPATCH_EXPORT const Vector WidthVector(void) const { return _radii[0]; }
230 
231  /** Gets the radii of the height vector in logical units.
232  * \return The height of the NinePatch as a Vector.
233  */
234  GLSGEN_GLSNINEPATCH_EXPORT const Vector HeightVector(void) const { return _radii[1]; }
235 
236  /** Setter function for the bottom left corner of the texture in the GlsNinePatch
237  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Bottom Left Corner' vector
238  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Bottom Left Corner' vector
239  */
240  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const float x, const float y );
241  GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const Vector& value ) { TextureBLC( value.x, value.y ); }
242 
243  /** Setter function for the top right corner of the texture in the GlsNinePatch
244  * \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Top Right Corner' vector
245  * \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Top Right Corner' vector
246  */
247  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const float x, const float y );
248  GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const Vector& value ) { TextureTRC( value.x, value.y ); }
249 
250  /** Getter function for the bottom left corner of the texture in the GlsNinePatch
251  * \return Returns the vector in pixel units for the value of the 'Bottom Left Corner'
252  */
253  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureBLC(void) const { return _textureBLC; }
254 
255  /** Getter function for the top right corner of the texture in the GLSNinePatch
256  * \return Returns the vector in pixel units for the value of the 'Top Right Corner'
257  */
258  GLSGEN_GLSNINEPATCH_EXPORT Vector TextureTRC(void) const { return _textureTRC; }
259 
260  /** Setter function for the height of the GlsNinePatch in logical units
261  * \param value sets the height of the GlsNinePatch in the direction of _radii[1]
262  */
263  GLSGEN_GLSNINEPATCH_EXPORT void Height(const float& value);
264  /** Setter function for the width of the GlsNinePatch in logical units
265  * \param value sets the width of the GlsNinePatch in the direction of _radii[0]
266  */
267  GLSGEN_GLSNINEPATCH_EXPORT void Width(const float& value);
268  /** Getter function for the height of the GlsNinePatch in logical units
269  * \return The height of the NinePatch
270  */
271  GLSGEN_GLSNINEPATCH_EXPORT float Height(void) const { return _height; }
272  /** Getter function for the width of the GlsNinePatch in logical units
273  * \return The width of the NinePatch
274  */
275  GLSGEN_GLSNINEPATCH_EXPORT float Width(void) const { return _width; }
276 
277  /** Returns a pointer to the patch vertices*/
278  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vertex* GetPatchVerts();
279 
280  /** Returns a pointer to the texture points*/
281  virtual GLSGEN_GLSNINEPATCH_EXPORT const Vector* GetPatchTex();
282 
283  /** Gets the "child" rectangle. The child rectangle refers to the
284  * inner rectangle of the nine patch, which is where normal content would be drawn
285  */
286  GLSGEN_GLSNINEPATCH_EXPORT Rect3D GetChildRect();
287 
288  /** Sets the reference texture width, which allows the nine patch to respond to changes of texture size.
289  * \param value The reference width of the texture in pixel units
290  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
291  * nine patch will not display will need to be reconfigured by hand. The reference width should
292  * generally be the width of the original texture. It will be automatically updated when image changes
293  * are detected.
294  * \sa ReferenceTextureWidth()
295  */
296 
297  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureWidth(const unsigned int& value);
298  /** Sets the reference texture height, which allows the nine patch to respond to changes of texture size.
299  * \param value The reference height of the texture in pixel units
300  * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
301  * nine patch will not display will need to be reconfigured by hand. The reference height should
302  * generally be the height of the original texture. It will be automatically updated when image changes
303  * are detected.
304  * \sa ReferenceTextureHeight()
305  */
306  GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureHeight(const unsigned int& value);
307  /** Gets the reference texture width, which allows the nine patch to respond to changes of texture size.
308  * \sa ReferenceTextureWidth()
309  */
310  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureWidth();
311  /** Gets the reference texture height, which allows the nine patch to respond to changes of texture size.
312  * \sa ReferenceTextureHeight()
313  */
314  GLSGEN_GLSNINEPATCH_EXPORT unsigned int ReferenceTextureHeight();
315 
316  /** Forces the nine patch to recalculate it's verts and it's texture verts.
317  * \sa ForceRecalculate()
318  */
319  GLSGEN_GLSNINEPATCH_EXPORT void ForceRecalculate();
320 
321 protected:
322 
323  /** Calculate the vertices for the nine patches */
324  void CalculatePatchVerts();
325 
326  /** Calculate the texture coordinates for the nine patches */
327  void CalculateTextureVerts();
328 
329  /** Calculates new values when a texture has been upsized or downsized */
330  void CalculateTextureResize(const int tw, const int th);
331 
332  /** Calculates _width, _height and _normal based on _radii */
333  void CalculateRadiiUnit(void);
334 
335  /** callback called when the 9patch needs to be recalculated */
336  void SetNeedsRecalculate( void );
337 
338  /** callback called when the 9patch texture coordinates need to be recalculated */
339  void SetNeedsTextureRecalculate( void );
340 
341  /** Draws a grid displaying the 9 polygons on top of the image */
342  void DrawGuides(void);
343 
344 #ifdef GLES
345  /** Set a single attribute from the GLO file.
346  * \param data The attribute to set and its associated data.
347  */
348  virtual GLS_EXPORT void SetFromGloData(GlsGloFileAttribute &data);
349 #endif
350 
351 #ifndef GLES
352  /** Helper routine to draws the 9 patches */
353  void DrawPatches(bool texture);
354 
355  /** Performs OpenGL drawing commands */
356  void DrawGeometry(void);
357 #endif
358 
359  /** Array of vertices that defines the NinePatch, arranged as follows:
360  * 12--13---14---15
361  * | | | |
362  * 8----9---10---11
363  * | | | |
364  * 4----5----6----7
365  * | | | |
366  * 0----1----2----3
367  */
368  Vertex _patchVerts[GLS_NINE_PATCH_ARRAY_SIZE];
369 
370  /** Array of texture coordinates, arranged the same way as _patchVerts */
371  Vector _patchTex[GLS_NINE_PATCH_ARRAY_SIZE];
372 
373  /** Radius vectors that define the size of the NinePatch
374  * _radii[0] defines the width
375  * _radii[1] defines the height
376  */
378 
379  Vector _normal; /**< Surface normal of the NinePatch. Computed from the _radii */
380  Vector _textureBLC; /**< Texture coordinate of bottom left corner of NinePatch */
381  Vector _textureTRC; /**< Texture coordinate of top right corner of NinePatch */
382  float _width; /**< Width of the NinePatch in the direction of _radii[0] */
383  float _height; /**< Height of the NinePatch in the direction of _radii[1] */
384 
385  /** Values representing the distance from the edge of the texture that makes up the
386  * NinePatch borders. Units are in pixels and are the distance IN from the edge of the texture.
387  */
388 
389  float _textureEdge[4];
390 
391  /** Values representing the size of edges of the NinePatch. Units are in logical units measure
392  * going IN from the edge of the NinePatch
393  */
394  float _vertexEdge[4];
395 
396  bool _centerVisible; /**< Whether or not the center patch will be drawn */
397  bool _needsRecalculate; /**< True when the vertices need to be recalculated */
398  bool _needsTextureRecalculate; /**< True when the texture coordinates need to be recalculated */
399  bool _guidesVisible; /**< If true, then "guides" will be drawn". Normally only set in the editor */
400  glsColor _objectColor; /**< Fill color is normally stored in vertices, but we're not using these in GlsNinePatch */
401  unsigned int _texWidth; /**< Texture Width */
402  unsigned int _texHeight; /**< Texture Height */
403 
404 #ifdef GLES
405  GlsVertexArray _vertArray;
406  GlsIndexArray _indexArray;
407 #endif
408 
409  unsigned int _referenceTexWidth; /**< Texture Width when the object was configured. Used to correctly adjust for new texture resolutions. */
410  unsigned int _referenceTexHeight; /**< Texture Height when the object was configured. Used to correctly adjust for new texture resolutions. */
411 
412 };
413 
414 } // namespace disti
415 
416 #endif
417 
Definition: cull.h:50
virtual void PolygonMode(int mode)
Definition: gls_nine_patch.h:157
float _height
Definition: gls_nine_patch.h:383
unsigned int _referenceTexHeight
Definition: gls_nine_patch.h:410
virtual void SetFillColor(const glsColor &color)
void SetNeedsTextureRecalculate(void)
Definition: vertex.h:365
virtual void CopyProperties(DisplayObject *src)
Vector _textureTRC
Definition: gls_nine_patch.h:381
virtual void GetTransformedExtents(Vector &min, Vector &max, const GlsMatrixType &matrix, bool resetMinMax)
bool _needsRecalculate
Definition: gls_nine_patch.h:397
Definition: dynamic_array.h:63
bool CenterVisible()
Definition: gls_nine_patch.h:212
Vertex _patchVerts[16]
Definition: gls_nine_patch.h:368
virtual glsColor GetFillColor(void)
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:281
void DrawGuides(void)
virtual void PreDraw(const OpenGLMatrices &current, Culler &culler)
Vector TextureBLC(void) const
Definition: gls_nine_patch.h:253
Vector _normal
Definition: gls_nine_patch.h:379
virtual int PolygonMode(void)
Definition: gls_nine_patch.h:151
Vector _radii[2]
Definition: gls_nine_patch.h:377
The Polygon class. Implements Polygons.
Definition: glpolygon.h:56
virtual void Scale(float px, float py, float pz, Vertex *anchor, int handleBar)
bool _needsTextureRecalculate
Definition: gls_nine_patch.h:398
void TextureEdge(Edge index, float value)
Definition: display.h:98
const Vector HeightVector(void) const
Definition: gls_nine_patch.h:234
Vector _patchTex[16]
Definition: gls_nine_patch.h:371
virtual void GetExtents(float &minx, float &miny, float &minz, float &maxx, float &maxy, float &maxz)
virtual void GetCppInterfaceDescriptionFree(InterfaceListType *array)
The disti::GLPolygon class. Implements Polygons.
virtual void CopyGeometry(DisplayObject *srcArg)
unsigned int _texWidth
Definition: gls_nine_patch.h:401
Vector TextureTRC(void) const
Definition: gls_nine_patch.h:258
virtual InterfaceListType * GetCppInterfaceDescription(InterfaceListType *addToThisList=NULL)
float _vertexEdge[4]
Definition: gls_nine_patch.h:394
unsigned int ReferenceTextureHeight()
float Height(void) const
Definition: gls_nine_patch.h:271
virtual void Draw(void)
void CalculateTextureResize(const int tw, const int th)
virtual void Calculate(double time)
void DrawPatches(bool texture)
void VertexEdge(Edge index, float value)
void CalculateTextureVerts()
VertexNoColor Vector
Definition: gls_font_base.h:68
virtual DisplayObject * CloneObject(bool generateNames=false)
virtual void SetAvailableAttributes(unsigned int value)
Vector _textureBLC
Definition: gls_nine_patch.h:380
unsigned int _referenceTexWidth
Definition: gls_nine_patch.h:409
Definition: gls_nine_patch.h:90
bool _centerVisible
Definition: gls_nine_patch.h:396
virtual Vertex * Vertices()
The gls_auto_lib.
void SetNeedsRecalculate(void)
Definition: gls_color.h:54
virtual void SetValue(int spec, va_list &args)
float Width(void) const
Definition: gls_nine_patch.h:275
Definition: gls_nine_patch.h:101
float _width
Definition: gls_nine_patch.h:382
void CalculateRadiiUnit(void)
glsColor _objectColor
Definition: gls_nine_patch.h:400
virtual void UpdateBoundingVolume(void)
virtual const Vector * GetPatchTex()
bool _guidesVisible
Definition: gls_nine_patch.h:399
virtual const Vertex * GetPatchVerts()
Definition: vertex.h:84
unsigned int _texHeight
Definition: gls_nine_patch.h:402
Definition: display_types.h:94
virtual bool Hit(float x, float y, float z, float scale, const Vector &directionVector, Vector *collisionPoint)
virtual void Rotate(const Vector &orig, float angle, const Vector &axis)
Macros and helper code to determine what subset of C++11/14/17 is available.
const Vector WidthVector(void) const
Definition: gls_nine_patch.h:229
void DrawGeometry(void)
Definition: bmpimage.h:46
The disti::GlsDisplayList class.
unsigned int ReferenceTextureWidth()
float _textureEdge[4]
Definition: gls_nine_patch.h:389