Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoVectorizeHPGLAction.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef __SO_VECTORIZE_HPGL_ACTION_
25#define __SO_VECTORIZE_HPGL_ACTION_
26
27#include <HardCopy/SoVectorizeAction.h>
28
43{
44
45 public:
46
51
57};
58
76
77 SO_ACTION_HEADER(SoVectorizeHPGLAction);
78
79 public:
80
85
90
95
96private:
100 static void initClass();
101 static void exitClass();
102
103 private:
104 virtual void printPolyMark(const SbVec4f *points,
105 int num_points,
106 const SbColor *colors,
107 SbBool color_flag,
108 float size);
109#ifndef NO_TGS_OIV
110 virtual void printPolyMark(const SbVec4f *points,
111 int num_points,
112 const SbColor *colors,
113 SbBool color_flag,
114 SoMarkerSet *markerSet);
115 virtual void printImage(const SbVec4f &origin,
116 const unsigned char *imagePixels,
117 SbVec2s &sourceSize,
118 SbVec2s &requestedSize,
119 int numComponents,
120 SoImage::HorAlignment horAlign,
121 SoImage::VertAlignment vertAlign);
122#endif
123 virtual void printPolyLine(const SbVec4f *points,
124 int num_points,
125 const SbColor *colors,
126 SbBool color_flag,
127 float thickness,
128 u_short linePattern,
129 int linePatternScaleFactor = 1);
130 virtual void printPolygon(const SbVec4f *points,
131 int num_points,
132 const SbColor *colors,
133 SbBool color_flag,
134 const SbString &category,
135 const SbString &name,
136 const unsigned char *pattern);
137 virtual void printText2(const SbVec4f point,
138 const SbColor color,
139 const SbString& font_name,
140 float font_size,
141 const SbString& string,
142 int justif,
143 float angle);
144
145 // Print the border and the background
146 virtual void printBorder();
147 virtual void printBackground();
148
149 private:
150 // Write header and footer
151 virtual void writeHeader();
152 virtual void writeFooter();
153
154 // Set hardware clipping
155 virtual void setHardwareClip();
156
157 // Compute clipping limits
158 SbBox2f getClippingLimits() const;
159
160 private:
161 // Miscellaneous methods
162
163 void assignColor(SbColor color, float linewidth, int *pen_color);
164
165 // data
166 int m_currentColor;
167 EndLineStyle m_currentLineEndStyle;
168 JoinLineStyle m_currentLineJoinsStyle;
169 float m_currentMiterLimit;
170 float m_currentThickness;
171 u_short m_currentLinePattern;
172 int m_currentPatternScaleFactor;
173 float m_scaleFont;
174 SbString m_fontname;
175 int m_justification;
176 float m_textAngle;
177};
178
179
180/*****************************************************************************/
181
182#endif //__SO_VECTORIZE_HPGL_ACTION_
183
2D box class.
Definition SbBox.h:1798
Color vector class.
Definition SbColor.h:82
Class for smart character strings.
Definition SbString.h:202
2D vector class.
Definition SbVec.h:700
4D vector class.
Definition SbVec.h:2214
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Class used to write ve...
virtual ~SoHPGLVectorOutput()
Destructor.
SoHPGLVectorOutput()
Constructor.
VertAlignment
Vertical alignment.
Definition SoImage.h:146
HorAlignment
Horizontal alignment.
Definition SoImage.h:130
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Extension of Poi...
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Abstract class used to...
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Abstract class for vec...
EndLineStyle
End line style.
JoinLineStyle
Join line style.
<a href="IconLegend.html"><img src="extHC.gif" alt="HardCopy" border="0"></a> Realizes the vectoriza...
SoHPGLVectorOutput * getHPGLVectorOutput() const
Returns the SoHPGLVectorOutput instance in action.
SoVectorizeHPGLAction()
Constructor.
virtual ~SoVectorizeHPGLAction()
Destructor.
int SbBool
Boolean type.
Definition SbBase.h:87