6 #if !defined(LST_DRAWPS_H__INCLUDED_)
7 #define LST_DRAWPS_H__INCLUDED_
10 #define SNPRINTF sprintf_s
12 #define SNPRINTF snprintf
20 #include "CgmObjects/DrawBase.h"
21 #include "Utility/Color.h"
22 #include "Utility/LSTException.h"
33 ePolygonSetLessThan3Pts = EXC_DRAWPS,
34 eDiscontPolyBez4Pt = EXC_DRAWPS + 1
39 std::wstring filename;
51 std::string dashArray;
54 #define DEF_LNCAP "round"
55 #define DEF_LNJOIN "round"
64 std::string dashArray;
73 void setTransform(DRect *window, DRect *viewport, DRect *clientRect,
double rotation,
int originFlag);
81 void drawDCdots(
CCgmBaseObj *pCgmBaseObj, DPoint *pDa,
long cnt);
82 void eraseDCarea(DRect *area);
87 void drawPolymarker(
CCgmPoly *pCgmPoly);
95 void setDisplay(
void* pDisplay,
void* pOther = 0);
97 std::string rgbStr(CColor color,
bool bDevColor =
true);
99 std::string setStroke(
CCgmBaseObj *pCgmBaseObj,
bool bSolidAux);
100 std::string setFillStroke(
CCgmBaseObj *pCgmBaseObj);
102 void makeImage(
double x,
double y,
double w,
double h,
long nx,
long ny,
103 unsigned char *raw,
long tuple, CColor fgc, CColor bgc,
long rPad,
104 long bTrans, CColor tc);
110 long cantFillAttr(
CCgmBaseObj *pCgmBaseObj,
bool *bPat,
double *xf,
double *yf,
double *ox,
double *oy);
118 Larson::CColor m_bgColor;
120 double WeightToD(
double scale,
int specMode,
double scaleFactor = 1.0);
122 std::string minDigitStr(
double v,
int dps = 2);
126 std::vector<strokeInfo> m_strokeInfo;
127 std::vector<std::string> m_fillInfo;
129 long m_SVGcpIndexAPS;
133 std::string stdW2stdS(std::wstring wstr,
bool noDblDash =
false);
135 void xy(
double x,
double y,
double xf,
double yf,
double ox,
double oy);
136 void wh(
double x,
double y,
double xf,
double yf);
137 void moveto(
double x,
double y,
double xf,
double yf,
double ox,
double oy);
138 void lineto(
double x,
double y,
char L,
double xf,
double yf,
double ox,
double oy);
139 void curveto(
double x1,
double y1,
double x2,
double y2,
double x3,
double y3,
double xf,
double yf,
double ox,
double oy);
142 std::wstring m_outputFilename;
143 double m_outputWidth;
144 double m_outputHeight;
145 bool m_bUncompressed;
155 long m_nCurHatchPatNumb;
156 std::vector<std::string> m_crossHatchWritten;
158 std::vector<void*> m_compoundTextPathWritten;
160 bool m_bPatternAsRects;
161 std::vector<void*> m_patternWritten;
170 unsigned char lastLineCap;
171 unsigned char lastLineDashCap;
172 unsigned char lastLineJoin;
174 double lastLineWidth;
175 long lastHatchPatternIndex;
176 long lastProtRegBundleIndex;
177 long lastClipRectIndex;
179 double lastFontMat[6];
180 std::wstring lastFontname;
181 vector<string> fontsUsed;
185 #endif // !defined(LST_DRAWPS_H__INCLUDED_)
long setFillAttr(CCgmBaseObj *pCgmBaseObj)
apply fill attributes
Definition: DrawSVG.h:107
CCgmCircle – Circle and CircularArc elements container class.
Definition: CgmObj.h:1258
void drawCellArray(CCgmCellArray *pCCgmCellArray)
draw a cell array as specfied by pCCgmCellArray, points are in VDC units
Definition: DrawSVG.cpp:1829
CCgmEllipse – Ellipse and EllipticalArc elements container class.
Definition: CgmObj.h:1309
void drawDCline(CCgmBaseObj *pCgmBaseObj, DPoint *pDa, long cnt, bool close)
draw a series of connected or unconnected lines specified by pPts in device coordinates ...
Definition: DrawSVG.cpp:493
CCgmCellArray – CellArray element container class.
Definition: CgmObj.h:933
void close()
close device and release memory
Definition: DrawSVG.cpp:202
bool applyClipping(CCgmBaseObj *, DRect *rect)
apply clipping rectangle and protection regions if either or both are indicated
Definition: DrawSVG.cpp:746
void setTransform(DRect *window, DRect *viewport, DRect *clientRect, double rotation, int originFlag)
set VDC to device coordinates transform
Definition: DrawSVG.cpp:95
CCgmRect – Rectangle element container class.
Definition: CgmObj.h:751
CDrawBase – drawing base class from which all output specific draw classes are derived.
Definition: DrawBase.h:19
long setLineAttr(CCgmBaseObj *pCgmBaseObj)
apply line attributes
Definition: DrawSVG.h:106
Path – graphical path data container class.
Definition: Path.h:17
void clear()
clear display area and set to background color if indicated
Definition: DrawSVG.cpp:470
CCgmPoly – Poly elements container class(Polyline, PolyBezier, Polygon, Disjoint Polyline) ...
Definition: CgmObj.h:883
CDrawSVG – SVG drawing class.
Definition: DrawSVG.h:29
CCgmBaseObj – graphical element container base class.
Definition: CgmObj.h:121
CAppStruct – Application Structure (APS) container class.
Definition: AppStruct.h:23
CCgmText – Text and RestrictedText elements container class.
Definition: CgmObj.h:794
void open()
open device for drawing
Definition: DrawSVG.cpp:135
void setDisplay(void *pDisplay, void *pOther=0)
select target device
Definition: DrawSVG.cpp:105
CCgmObjects – CGM Picture container.
Definition: CgmObjects.h:472
void drawDCfill(CCgmBaseObj *pCgmBaseObj, DPoint *pDa, long cnt)
fill a polygonal area specified by pPts in device coordinates
Definition: DrawSVG.cpp:624