GL Studio C++ Runtime 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) 2017 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
14reproduced, in whole or part, in any form, or by any means of electronic,
15mechanical, or otherwise, without the written permission of DiSTI. Said
16permission may be derived through the purchase of applicable DiSTI product
17licenses which detail the distribution rights of this content and any
18Derivative Works based on this or other copyrighted DiSTI Software.
19
20 NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND,
21AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT
22PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES
23AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
24IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A
25PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.
26
27 LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
28IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
29INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
30DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
31INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR
32INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY
33OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT
34EXCEED FIVE DOLLARS (US$5.00).
35
36 The aforementioned terms and restrictions are governed by the laws of the
37State 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"
44
45#ifdef GLES
46# include "gls_index_array.h"
47# include "gls_vertex_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 ) || 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 )
57# else
58# define GLSGEN_GLSNINEPATCH_EXPORT __declspec( dllimport )
59# endif
60#else
61# define GLSGEN_GLSNINEPATCH_EXPORT
62#endif
63///////////////////////////////////////////////////////////////////////////////
64
65/// Automatically link the runtime library plugin (on Windows).
66#define LIB_BASE_NAME "gls_nine_patch"
67#include "gls_auto_lib.h"
68#undef LIB_BASE_NAME
69
70namespace disti
71{
72// SetValue enumerations
73enum
74{
75 GLS_NINE_PATCH_FIRST_VALUE = GLS_LAST_INITIALIZER + 1,
76 GLS_NINE_PATCH_CENTER_VISIBLE,
77 GLS_NINE_PATCH_EDGES,
78 GLS_NINE_PATCH_TEXTURE_EDGES,
79 GLS_NINE_PATCH_RADII,
80 GLS_NINE_PATCH_TEXTURE_POINTS,
81 GLS_NINE_PATCH_COLOR,
82 GLS_NINE_PATCH_REFERENCE_TEXTURE_WIDTH_HEIGHT
83};
84
85#define GLS_NINE_PATCH_ARRAY_SIZE 16 ///< The number of vertices present in a nine patch.
86
87/** Runtime implementation of a GlsNinePatch */
88class GlsNinePatch : public GLPolygon
89{
90 friend class GlsNinePatchEditor;
91
92private:
95
96public:
97 DISTI_DEPRECATED( "This identifier is forbidden by the C++ standard. Use BaseClass instead." )
98 typedef GLPolygon _BaseClass; ///< Deprecated typedef for the base class.
99 typedef GLPolygon BaseClass; ///< Typedef for the base class.
100
101 /// \details The Rect3D class. Describes a 3D bounding box.
102 class Rect3D
103 {
104 public:
105 Vector blc; ///< The bottom left corner.
106 Vector brc; ///< The bottom right corner.
107 Vector trc; ///< The top right corner.
108
109 Rect3D(){};
110 };
111
112 /// Constructor
113 /// \param generateInstance Whether or not to generate an instance name for this object.
114 GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( bool generateInstance = false );
115
116 /// Copy constructor
117 /// \param that The object to copy from.
118 /// \param generateNames Whether or not to generate an instance name for this object.
119 GLSGEN_GLSNINEPATCH_EXPORT GlsNinePatch( const GlsNinePatch& that, const bool generateNames );
120
122
123 /// \return A pointer to a new GlsNinePatch object.
125
126 // DisplayObject overrides
127
128 virtual GLSGEN_GLSNINEPATCH_EXPORT void Scale( float px, float py, float pz, Vertex* anchor, int handleBar ) DISTI_METHOD_OVERRIDE;
129 virtual GLSGEN_GLSNINEPATCH_EXPORT void Rotate( const Vector& orig, float angle, const Vector& axis ) DISTI_METHOD_OVERRIDE;
130 virtual GLSGEN_GLSNINEPATCH_EXPORT bool Hit( float x, float y, float z, float scale, const Vector& directionVector, Vector* collisionPoint ) DISTI_METHOD_OVERRIDE;
132 virtual GLSGEN_GLSNINEPATCH_EXPORT void GetExtents( float& minx, float& miny, float& minz, float& maxx, float& maxy, float& maxz ) DISTI_METHOD_OVERRIDE;
133 virtual GLSGEN_GLSNINEPATCH_EXPORT void GetTransformedExtents( Vector& min, Vector& max, const GlsMatrixType& matrix, bool resetMinMax ) DISTI_METHOD_OVERRIDE;
135 virtual GLSGEN_GLSNINEPATCH_EXPORT void SetValue( int spec, va_list& args ) DISTI_METHOD_OVERRIDE;
140
141#ifndef GLES
144#endif
145
147
148#ifdef GLES
149 virtual GLSGEN_GLSNINEPATCH_EXPORT void PreDraw( const OpenGLMatrices& current, Culler& culler ) DISTI_METHOD_OVERRIDE;
150#endif
151
153
156
157 /** Gets the polygon drawing mode for this object
158 * \return The polygon drawing mode for this object
159 * \sa PolygonMode_e
160 */
162
163 /** Sets the polygon drawing mode for this object
164 * \param mode The new polygon drawing mode for this object
165 * \sa PolygonMode_e
166 */
167 virtual GLSGEN_GLSNINEPATCH_EXPORT void PolygonMode( int mode ) DISTI_METHOD_OVERRIDE {} // do nothing
168
169 /** The enumeration defining which edge textures and vertices refer to*/
170 enum Edge
171 {
172 FIRST = 0,
173 LEFT = 0,
174 RIGHT = 1,
175 TOP = 2,
176 BOTTOM = 3,
177 // The number of items
178 COUNT = 4
179 };
180
181 /// Set's the texture edge at enum specified by index to the value specified as pixel units.
182 /// \param index Refers to the texture edge enumeration that will be modified.
183 /// \param value The pixel unit(s) assigned to the specificed texture edge enumeration.
184 GLSGEN_GLSNINEPATCH_EXPORT void TextureEdge( Edge index, float value );
185
186 /// Shortcut to set the nine patch's left texture edge.
187 /// \param value The new texture edge value in pixels.
188 GLSGEN_GLSNINEPATCH_EXPORT void LeftTextureEdge( float value ) { TextureEdge( LEFT, value ); }
189
190 /// Shortcut to set the nine patch's right texture edge.
191 /// \param value The new texture edge value in pixels.
192 GLSGEN_GLSNINEPATCH_EXPORT void RightTextureEdge( float value ) { TextureEdge( RIGHT, value ); }
193
194 /// Shortcut to set the nine patch's top texture edge.
195 /// \param value The new texture edge value in pixels.
196 GLSGEN_GLSNINEPATCH_EXPORT void TopTextureEdge( float value ) { TextureEdge( TOP, value ); }
197
198 /// Shortcut to set the nine patch's bottom texture edge.
199 /// \param value The new texture edge value in pixels.
200 GLSGEN_GLSNINEPATCH_EXPORT void BottomTextureEdge( float value ) { TextureEdge( BOTTOM, value ); }
201
202 /// Set's the vertex edge at enum specified by index to the value specified as logical units.
203 /// \param index Refers to the vertex edge enumeration that will be modified.
204 /// \param value Is the logical unit(s) assigned to the specificed vertex edge enumeration.
205 GLSGEN_GLSNINEPATCH_EXPORT void VertexEdge( Edge index, float value );
206
207 /// Shortcut to set the nine patch's left vertex edge.
208 /// \param value The new vertex edge value in logical units.
209 GLSGEN_GLSNINEPATCH_EXPORT void LeftVertexEdge( float value ) { VertexEdge( LEFT, value ); }
210
211 /// Shortcut to set the nine patch's right vertex edge.
212 /// \param value The new vertex edge value in logical units.
213 GLSGEN_GLSNINEPATCH_EXPORT void RightVertexEdge( float value ) { VertexEdge( RIGHT, value ); }
214
215 /// Shortcut to set the nine patch's top vertex edge.
216 /// \param value The new vertex edge value in logical units.
217 GLSGEN_GLSNINEPATCH_EXPORT void TopVertexEdge( float value ) { VertexEdge( TOP, value ); }
218
219 /// Shortcut to set the nine patch's bottom vertex edge.
220 /// \param value The new vertex edge value in logical units.
221 GLSGEN_GLSNINEPATCH_EXPORT void BottomVertexEdge( float value ) { VertexEdge( BOTTOM, value ); }
222
223 /// Return the value in pixel units of the TextureEdge given at enumeration specified by index.
224 /// \param index Refers to the edge enumeration that the value will be gotten from.
225 /// \return A float value in pixel units that corresponds with the respective VertexEdge index/enum.
227
228 /// \return The left texture edge value in pixels.
230
231 /// \return The right texture edge value in pixels.
233
234 /// \return The top texture edge value in pixels.
236
237 /// \return The bottom texture edge value in pixels.
239
240 /// Return the value in logical units at the edge enumeration specified by index.
241 /// \param index Refers to the edge enumeration.
242 /// \return A float value in logical units that corresponds with the respective TextureEdge index/enum.
244
245 /// \return The left vertex edge value in logical units.
247
248 /// \return The right vertex edge value in logical units.
250
251 /// \return The top vertex edge value in logical units.
253
254 /// \return The bottom vertex edge value in logical units.
256
257 /// Getter function to determine whether or not the center will be drawn.
258 /// \return True being returned lets the user know that the Center of the NinePatch is visible.
260
261 /// Set whether or not the center quad will be drawn..
262 /// \param value The new visibility flag for the center quad.
264
265 /// Sets the radii of the width vector in logical units.
266 /// \param v Will set the radii's width row's logical values of the glsNinePatch object.
268
269 /// Sets the radii of the height vector in logical units.
270 /// \param v Will set the radii's height row's logical values of the glsNinePatch object.
272
273 /// Gets the radii of the width vector in logical units.
274 /// \return The width of the NinePatch as a Vector.
276
277 /// Gets the radii of the height vector in logical units.
278 /// \return The height of the NinePatch as a Vector.
280
281 /// Setter function for the bottom left corner of the texture in the GlsNinePatch.
282 /// \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Bottom Left Corner' vector.
283 /// \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Bottom Left Corner' vector.
284 GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const float x, const float y );
285
286 /// Setter function for the bottom left corner of the texture in the GlsNinePatch.
287 /// \param value A vector containing x and y pixel unit values to apply to the texture bottom left corner.
288 GLSGEN_GLSNINEPATCH_EXPORT void TextureBLC( const Vector& value ) { TextureBLC( value.x, value.y ); }
289
290 /// Setter function for the top right corner of the texture in the GlsNinePatch.
291 /// \param x A pixel unit value that is applied to the GlsNinePatch's first field in the 'Top Right Corner' vector.
292 /// \param y A pixel unit value that is applied to the GlsNinePatch's second field in the 'Top Right Corner' vector.
293 GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const float x, const float y );
294
295 /// Setter function for the top right corner of the texture in the GlsNinePatch.
296 /// \param value A vector containing x and y pixel unit values to apply to the texture top right corner.
297 GLSGEN_GLSNINEPATCH_EXPORT void TextureTRC( const Vector& value ) { TextureTRC( value.x, value.y ); }
298
299 /// Getter function for the bottom left corner of the texture in the GlsNinePatch.
300 /// \return The vector in pixel units for the value of the 'Bottom Left Corner'.
302
303 /// Getter function for the top right corner of the texture in the GLSNinePatch.
304 /// \return The vector in pixel units for the value of the 'Top Right Corner'.
306
307 /// Setter function for the height of the GlsNinePatch in logical units.
308 /// \param value Sets the height of the GlsNinePatch in the direction of _radii[1].
309 GLSGEN_GLSNINEPATCH_EXPORT void Height( const float& value );
310
311 /// Setter function for the width of the GlsNinePatch in logical units.
312 /// \param value Sets the width of the GlsNinePatch in the direction of _radii[0].
313 GLSGEN_GLSNINEPATCH_EXPORT void Width( const float& value );
314
315 /// Getter function for the height of the GlsNinePatch in logical units.
316 /// \return The height of the NinePatch.
317 GLSGEN_GLSNINEPATCH_EXPORT float Height() const { return _height; }
318
319 /// Getter function for the width of the GlsNinePatch in logical units.
320 /// \return The width of the NinePatch.
321 GLSGEN_GLSNINEPATCH_EXPORT float Width() const { return _width; }
322
323 /// \return A pointer to the patch vertices.
325
326 /// \return A pointer to the texture points.
328
329 /// Gets the "child" rectangle. The child rectangle refers to the
330 /// inner rectangle of the nine patch, which is where normal content would be drawn.
331 /// \return The bounding box of the child rectangle.
333
334 /** Sets the reference texture width, which allows the nine patch to respond to changes of texture size.
335 * \param value The reference width of the texture in pixel units
336 * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
337 * nine patch will not display will need to be reconfigured by hand. The reference width should
338 * generally be the width of the original texture. It will be automatically updated when image changes
339 * are detected.
340 * \sa ReferenceTextureWidth()
341 */
342 GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureWidth( const unsigned int& value );
343
344 /** Sets the reference texture height, which allows the nine patch to respond to changes of texture size.
345 * \param value The reference height of the texture in pixel units
346 * \note Setting this value is optional, but if it is not set and the physical texture size changes, the
347 * nine patch will not display will need to be reconfigured by hand. The reference height should
348 * generally be the height of the original texture. It will be automatically updated when image changes
349 * are detected.
350 * \sa ReferenceTextureHeight()
351 */
352 GLSGEN_GLSNINEPATCH_EXPORT void ReferenceTextureHeight( const unsigned int& value );
353
354 /// Gets the reference texture width, which allows the nine patch to respond to changes of texture size.
355 /// \sa ReferenceTextureWidth()
356 /// \return The width of the nine patch texture in pixels.
358
359 /// Gets the reference texture height, which allows the nine patch to respond to changes of texture size.
360 /// \sa ReferenceTextureHeight()
361 /// \return The height of the nine patch texture in pixels.
363
364 /** Forces the nine patch to recalculate it's verts and it's texture verts.
365 * \sa ForceRecalculate()
366 */
368
369protected:
370 /** Calculate the vertices for the nine patches */
372
373 /** Calculate the texture coordinates for the nine patches */
375
376 /// Calculates new values when a texture has been upsized or downsized.
377 /// \param tw The new texture width in pixels.
378 /// \param th The new texture height in pixels.
379 void CalculateTextureResize( const int tw, const int th );
380
381 /** Calculates _width, _height and _normal based on _radii */
383
384 /** callback called when the 9patch needs to be recalculated */
386
387 /** callback called when the 9patch texture coordinates need to be recalculated */
389
390 /** Draws a grid displaying the 9 polygons on top of the image */
392
393#ifdef GLES
394 /** Set a single attribute from the GLO file.
395 * \param data The attribute to set and its associated data.
396 */
397 virtual GLS_EXPORT void SetFromGloData( GlsGloFileAttribute& data ) DISTI_METHOD_OVERRIDE;
398#endif
399
400#ifndef GLES
401 /// Helper routine to draw the 9 patches.
402 /// \note Not normally called by users.
403 /// \param texture If true, draw with texturing enabled.
404 void DrawPatches( bool texture );
405
406 /** Performs OpenGL drawing commands */
408#endif
409
410 /** Array of vertices that defines the NinePatch, arranged as follows:
411 * 12--13---14---15
412 * | | | |
413 * 8----9---10---11
414 * | | | |
415 * 4----5----6----7
416 * | | | |
417 * 0----1----2----3
418 */
420
421 /** Array of texture coordinates, arranged the same way as _patchVerts */
423
424 /** Radius vectors that define the size of the NinePatch
425 * _radii[0] defines the width
426 * _radii[1] defines the height
427 */
429
430 Vector _normal; /**< Surface normal of the NinePatch. Computed from the _radii */
431 Vector _textureBLC; /**< Texture coordinate of bottom left corner of NinePatch */
432 Vector _textureTRC; /**< Texture coordinate of top right corner of NinePatch */
433 float _width; /**< Width of the NinePatch in the direction of _radii[0] */
434 float _height; /**< Height of the NinePatch in the direction of _radii[1] */
435
436 /** Values representing the distance from the edge of the texture that makes up the
437 * NinePatch borders. Units are in pixels and are the distance IN from the edge of the texture.
438 */
439 float _textureEdge[ 4 ];
440
441 /** Values representing the size of edges of the NinePatch. Units are in logical units measure
442 * going IN from the edge of the NinePatch
443 */
444 float _vertexEdge[ 4 ];
445
446 bool _centerVisible; /**< Whether or not the center patch will be drawn */
447 bool _needsRecalculate; /**< True when the vertices need to be recalculated */
448 bool _needsTextureRecalculate; /**< True when the texture coordinates need to be recalculated */
449 bool _guidesVisible; /**< If true, then "guides" will be drawn". Normally only set in the editor */
450 GlsColor _objectColor; /**< Fill color is normally stored in vertices, but we're not using these in GlsNinePatch */
451 unsigned int _texWidth; /**< Texture Width */
452 unsigned int _texHeight; /**< Texture Height */
453
454#ifdef GLES
455 GlsVertexArray _vertArray;
456 GlsIndexArray _indexArray;
457#endif
458
459 unsigned int _referenceTexWidth; /**< Texture Width when the object was configured. Used to correctly adjust for new texture resolutions. */
460 unsigned int _referenceTexHeight; /**< Texture Height when the object was configured. Used to correctly adjust for new texture resolutions. */
461};
462
463} // namespace disti
464
465#endif
Definition: cull.h:50
Definition: display.h:96
virtual void PreDraw(const OpenGLMatrices &current, 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)
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)
Definition: gls_vertex_array.h:60
Class to contain current OpenGL view, projection and draw matrices.
Definition: util.h:544
Definition: vertex.h:85
float y
The Y component.
Definition: vertex.h:88
float x
The X component.
Definition: vertex.h:87
Definition: vertex.h:420
The disti::GLPolygon class. Implements Polygons.
The gls_auto_lib.
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