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