COPASI API  4.16.103
utility_classes.h
Go to the documentation of this file.
1 // Copyright (C) 2015 by Pedro Mendes, Virginia Tech Intellectual
2 // Properties, Inc., University of Heidelberg, and The University
3 // of Manchester.
4 // All rights reserved.
5 
6 #ifndef UTILITY_CLASSES_H__
7 #define UTILITY_CLASSES_H__
8 
9 // opengl includes
10 #ifdef WIN32
11 # define WIN32_LEAN_AND_MEAN 1
12 # include <windows.h>
13 #endif // WIN32
14 
15 #ifdef __APPLE__
16 #include "OpenGL/gl.h"
17 #else
18 #include "GL/gl.h"
19 #endif // __APPLE__
20 
21 // stl includes
22 #include <string>
23 #include <vector>
24 
25 // render extension includes
28 #include "copasi/layout/CLText.h"
29 
30 class CLGraphicalObject;
31 
32 /**
33  * structure to store the texture for a TextGlyph
34  */
36 {
37  double mTextureWidth;
39  double mTextWidth;
40  double mTextHeight;
41  unsigned int mNumComponents;
42  GLuint mTextureName;
43 };
44 
45 /**
46  * structure to store the texture for a TextGlyph
47  */
49 {
50  double mScale;
51  double mMaxScale;
52  double mAscent;
53 };
54 
55 struct CLFontSpec
56 {
57  std::string mFamily;
58  double mSize;
61 
62  CLFontSpec();
63 
64  bool operator<(const CLFontSpec& right) const;
65 };
66 
68 {
69  GLdouble mX;
70  GLdouble mY;
71  GLdouble mZ;
72  // texture coordinate
73  GLdouble mS;
74 };
75 
77 {
78  unsigned int mPatternLength;
79  unsigned int mTextureLength;
80  GLuint mTextureName;
81 
82  CLLineStippleTexture(const std::vector<unsigned int>& dasharray);
83 
85 };
86 
88 {
89 public:
90  bool operator()(const CLGraphicalObject* pObject1, const CLGraphicalObject* pObject2) const;
91 };
92 
94 {
95 public:
96  std::string mStroke;
97  double mStrokeWidth;
98  std::vector<unsigned int> mStrokeDasharray;
99  // contains 12 double values
100  double* mpTransform;
101  std::string mFill;
103  std::string mFontFamily;
109  std::string mStartHead;
110  std::string mEndHead;
111  double mX;
112  double mY;
113  double mZ;
114  double mWidth;
115  double mHeight;
116 
117  /**
118  * Constructor that fills all values with default attributes.
119  */
121 
122  /**
123  * Destructor that deletes the memory used for the transformation
124  * array.
125  */
127 
128  /**
129  * Copy constructor.
130  */
132 
133  /**
134  * Assignment operator.
135  */
137 };
138 
139 #endif // UTILITY_CLASSES_H__
CLText::TEXT_ANCHOR mTextAnchor
std::string mEndHead
unsigned int mPatternLength
CLText::FONT_STYLE mFontStyle
bool operator()(const CLGraphicalObject *pObject1, const CLGraphicalObject *pObject2) const
std::string mFontFamily
FONT_STYLE
Definition: CLText.h:41
CLRelAbsVector mFontSize
double mTextureWidth
std::vector< unsigned int > mStrokeDasharray
CLGraphicalPrimitive2D::FILL_RULE mFillRule
CLLineStippleTexture(const std::vector< unsigned int > &dasharray)
TEXT_ANCHOR
Definition: CLText.h:48
CLGroupAttributes & operator=(const CLGroupAttributes &src)
unsigned int mTextureLength
double mTextureHeight
CLText::FONT_WEIGHT mWeight
CLText::TEXT_ANCHOR mVTextAnchor
CLText::FONT_WEIGHT mFontWeight
bool operator<(const CLFontSpec &right) const
std::string mStartHead
unsigned int mNumComponents
FONT_WEIGHT
Definition: CLText.h:34
std::string mFamily
CLText::FONT_STYLE mStyle
std::string mStroke