GL Studio API
glpolygon_glyph.h
Go to the documentation of this file.
1 /*! \file
2  \brief Implementation of the disti::GLPolygonGlyph Primitive Class for text objects.
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 
41 #ifndef _GLPOLYGON_GLYPH_H
42 #define _GLPOLYGON_GLYPH_H
43 
44 #include "display.h"
45 #include "gls_include.h"
46 
47 namespace disti
48 {
49 
50 /** The Polygon Glyph class. Implements Polygon Glyphs
51  * Used in the Font Class to draw Glyphs. One or more
52  * of this instances class makes up a single Glyph.
53  */
55 {
56  private:
57 
58  protected:
59 
60  /* The polygon drawing mode for this object. This is expected to be an OpenGl drawing
61  * mode (e.g.: GL_POLYGON) since it is used directly in glBegin */
62  int _gl_drawing_mode;
63 
64  public:
65 
66  /** Constructor, Creates a Glyph with the vertices specified
67  * \param nPoints The number of vertices in the new polygon
68  * \param vertices The array of vertices for the polygon, in
69  * world coordinate system
70  */
71  GLS_EXPORT GLPolygonGlyph(int nPoints,Vertex *vertices);
72 
73  //
74  // No destructor for this child class of DisplayObject.
75  // ~DisplayObject does all that is required!
76  //
77 
78  /** Draw this Glyph polygon. It is assumed that the calling
79  * functions have set up all of the draw parameters, location,
80  * rotation, color, line size, ... */
81  virtual GLS_EXPORT void Draw(void);
82 
83  /* Sets the polygon drawing mode for this object
84  * \param mode The new polygon drawing mode for this object
85  * This is expected to be an OpenGl drawing mode
86  * it is used directly in glBegin
87  */
88  virtual GLS_EXPORT void GLDrawingMode(int mode);
89 
90  /* Copy+Create operation in one method. In derived classes, this
91  * method will create a new instance of the derived class and then
92  * copy the object into the new instance. The cut,copy,paste and undo
93  * operations use this method.
94  * \param generateNames Whether or not to generate new names for cloned objects
95  * \return A new object, identical to the original, except for the instance name
96  */
97  virtual GLS_EXPORT DisplayObject *CloneObject(bool generateNames = false);
98 
99 };
100 
101 } // namespace disti
102 
103 #endif
Definition: vertex.h:365
virtual DisplayObject * CloneObject(bool generateNames=false)
Definition: glpolygon_glyph.h:54
GLPolygonGlyph(int nPoints, Vertex *vertices)
Definition: display.h:98
A file for all GL Studio files to include.
The disti::DisplayObject class and global enumerations.
virtual void Draw(void)
Definition: bmpimage.h:46