IPrinterDriver.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------------------+
2 |
3 | Supplied under applicable software license agreement.
4 |
5 | Copyright (c) 2018 Bentley Systems, Incorporated. All rights reserved.
6 |
7 +---------------------------------------------------------------------------------------*/
8 #pragma once
9 
10 #include <Mstn\Plot\PlotApi.h>
11 
12 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotDPoints);
13 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotPolygonSetParam);
14 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotPathParam);
15 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotClipParam);
16 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotTextParam);
17 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotBorderTextParam);
18 MSTNPLATFORM_PRINT_TYPEDEFS (IPlotRasterParam);
19 MSTNPLATFORM_PRINT_TYPEDEFS (IDriverPreBeginPlotParam);
20 MSTNPLATFORM_PRINT_TYPEDEFS (IDriverBeginPlotParam);
21 MSTNPLATFORM_PRINT_TYPEDEFS (IDriverEndPlotParam);
22 MSTNPLATFORM_PRINT_TYPEDEFS (IPrinterDriverOutputPath);
23 MSTNPLATFORM_PRINT_TYPEDEFS (IPrinterDriverOutputRaster);
24 MSTNPLATFORM_PRINT_TYPEDEFS (IPrinterDriverOutputText);
25 MSTNPLATFORM_PRINT_TYPEDEFS (IPrinterDriverOutputVector);
26 
29 
81 enum class PlotPathOperator
83  {
84  Undefined = 0,
85  MoveTo = 'm',
86  LineTo = 'l',
87  BezierTo = 'c',
88  };
89 
91 enum class PlotRasterFormat
92  {
93  BitMap = 1,
94  ByteMap = 3,
95  RGBSeparate = 5,
96  RGBA = 7
97  };
98 
101  {
102  None = 0,
103  Color = 1,
104  Mask = 2
105  };
106 
107 /*=================================================================================**/
112 {
114 virtual int GetNumPoints() const = 0;
115 
117 virtual DPoint2dCP GetDPoints() const = 0;
118 };
119 
120 /*=================================================================================**/
125 {
127 virtual int GetNumPolygons() = 0;
128 
130 virtual int GetTotalNumPoints() = 0;
131 
133 virtual IPlotDPointsP GetPolygon (int polygonIndex) = 0;
134 
136 virtual bool IsTextGlyph() const = 0;
137 
139 virtual bool GetIsTextBoundaryColorValid() = 0;
140 
142 virtual UInt32 GetTextBoundaryColor() = 0;
143 };
144 
145 /*=================================================================================**/
150 {
152 virtual int GetNumOperators() = 0;
153 
156 virtual PlotPathOperator GetNextOperator (IPlotDPointsP* operatorVerticesP) = 0;
157 
159 virtual void ResetCurrentOperator() = 0;
160 
162 virtual bool IsFilled() = 0;
163 
165 virtual bool ContainsCurves() = 0;
166 
168 virtual bool ContainsDisconnects() = 0;
169 
171 virtual int GetTotalNumPoints() = 0;
172 
174 virtual DPoint2dCP GetTotalDPoints() = 0;
175 
177 virtual CharCP GetOperators() = 0;
178 
180 virtual bool IsTextGlyph() const = 0;
181 
183 virtual bool GetIsTextBoundaryColorValid() = 0;
184 
186 virtual UInt32 GetTextBoundaryColor() = 0;
187 };
188 
189 /*=================================================================================**/
194 {
196 virtual bool GetIsPlotBorder() const = 0;
197 
199 virtual int GetBorderWidth() const = 0;
200 
202 virtual DRange2d ComputeRange() const = 0;
203 };
204 
205 /*=================================================================================**/
210 {
212 virtual WCharCP GetString() const = 0;
213 
215 virtual bool GetIsLicenseLabelNeeded() const = 0;
216 
218 virtual int GetBorderWidth() const = 0;
219 
221 virtual RgbaColorDef GetBorderColor() const = 0;
222 
224 virtual RgbaColorDef GetBackgroundColor() const = 0;
225 };
226 
227 /*=================================================================================**/
246 {
248 virtual PlotRasterFormat GetFormat() = 0;
249 
251 virtual byte* GetImage() = 0;
252 
254 virtual int GetPaletteSize() = 0;
255 
257 virtual byte* GetRedMap() = 0;
258 
260 virtual byte* GetGreenMap() = 0;
261 
263 virtual byte* GetBlueMap() = 0;
264 
266 virtual Point2dCR GetImageSize() = 0;
267 
269 virtual DRange2dCR GetImageRect() = 0;
270 
272 virtual DRange2dCR GetPlotterRect() = 0;
273 
275 virtual bool GetIsGrayscale() = 0;
276 
278 virtual PlotRasterTransparency GetTransparencyMode() = 0;
279 
281 virtual int GetTransparentIndex() = 0;
282 
284 virtual RgbColorDef GetTransparentColor() = 0;
285 
287 virtual UShort** GetTransparentMask() = 0;
288 
290 virtual double GetGlobalTransparency() = 0;
291 };
292 
293 /*=================================================================================**/
298 {
300 virtual IPrintEngineP GetPrintEngine() = 0;
301 };
302 
303 /*=================================================================================**/
308 {
310 virtual IPrintEngineP GetPrintEngine() = 0;
311 };
312 
313 /*=================================================================================**/
318 {
320 virtual IPrintEngineP GetPrintEngine() = 0;
321 
323 virtual bool IsSuccess() const = 0;
324 };
325 
327 
328 /*=================================================================================**/
344 {
350 virtual StatusInt DriverPreLoad() = 0;
351 
356 virtual StatusInt DriverLoad (IPlotterP plotter) = 0;
357 
360 virtual void DriverUnload() = 0;
361 
365 virtual StatusInt DriverPreBeginPlot (IDriverPreBeginPlotParamP param) = 0;
366 
369 virtual StatusInt DriverBeginPlot (IDriverBeginPlotParamP param) = 0;
370 
375 virtual StatusInt DriverEndPlot (IDriverEndPlotParamP param) = 0;
376 
379 virtual bool CheckStop() = 0;
380 
382 virtual void PushClip (IPlotClipParamP param) = 0;
383 
385 virtual void PopClip() = 0;
386 
388 virtual void BorderText (IPlotBorderTextParamP param) = 0;
389 };
390 
391 /*=================================================================================**/
396 {
398 virtual void SetColor (RgbaColorDef color) = 0;
399 
401 virtual void SetWidth (int widthDots) = 0;
402 
404 virtual void SetLineStyleIndex (int lineStyleIndex) = 0;
405 
407 virtual void SetLineJoin (PlotLineJoin lineJoin) = 0;
408 
410 virtual void SetLineCap (PlotLineCap lineCap) = 0;
411 
413 virtual void OutputLinestring (IPlotDPointsP param) = 0;
414 
416 virtual void OutputPolygonSet (IPlotPolygonSetParamP param) = 0;
417 };
418 
419 /*=================================================================================**/
424 {
426 virtual void OutputPath (IPlotPathParamP param) = 0;
427 };
428 
429 /*=================================================================================**/
434 {
436 virtual void OutputRaster (IPlotRasterParamP param) = 0;
437 };
438 
439 /*---------------------------------------------------------------------------------*/
445 DLLEXPORT void mdlPlot_registerIPrinterDriver (IPrinterDriverBaseP printerDriver);
446 
448 
451 
#define END_PRINT_NAMESPACE
Definition: MstnTypes.h:40
struct DRange2d const & DRange2dCR
Definition: msgeomstructs_typedefs.h:110
#define END_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:30
void mdlPlot_registerIPrinterDriver(IPrinterDriverBaseP printerDriver)
Registers a printer driver with the print engine.
Printer driver DriverPreBeginPlot event parameters.
Definition: IPrinterDriver.h:297
PlotLineCap
Plotter line cap.
Definition: IPlotter.h:274
Printer driver output path interface.
Definition: IPrinterDriver.h:423
#define bsiInterface
Definition: basedefs.h:31
PathTo (uses three vertices, BCD, where A=curPos, B&C are poles, D=endPos)
PlotRasterTransparency
Printer driver raster transparency mode.
Definition: IPrinterDriver.h:100
Printer driver output path event parameters.
Definition: IPrinterDriver.h:149
#define BEGIN_BENTLEY_MSTNPLATFORM_NAMESPACE
Definition: DgnPlatform.h:29
RGB separate (same as IMAGEFORMAT_RGBSeparate)
#define BEGIN_PRINT_NAMESPACE
Definition: MstnTypes.h:39
wchar_t const * WCharCP
Definition: Bentley.h:224
PlotRasterFormat
Printer driver raster format.
Definition: IPrinterDriver.h:91
Printer driver output vector interface.
Definition: IPrinterDriver.h:395
PlotLineJoin
Plotter line join.
Definition: IPlotter.h:286
uint32_t UInt32
Definition: Bentley.r.h:128
Printer driver output polygon set event parameters.
Definition: IPrinterDriver.h:124
Printer driver output raster interface.
Definition: IPrinterDriver.h:433
#define DLLEXPORT
Definition: basedefs.h:137
A 2d low and high corner pair for range boxes.
Definition: drange2d.h:21
Printer driver output clip event parameters.
Definition: IPrinterDriver.h:193
MSTNPLATFORM_PRINT_TYPEDEFS(IPlotDPoints)
Array of floating point X,Y coordinates.
Definition: IPrinterDriver.h:111
unsigned short UShort
Definition: Bentley.r.h:133
Printer driver output border text event parameters.
Definition: IPrinterDriver.h:209
unsigned char byte
Definition: Bentley.r.h:144
Base printer driver interface.
Definition: IPrinterDriver.h:343
int StatusInt
Definition: Bentley.h:222
char const * CharCP
Definition: Bentley.h:226
BitMap (same as IMAGEFORMAT_BitMap)
Printer driver DriverBeginPlot event parameters.
Definition: IPrinterDriver.h:307
struct DPoint2d const * DPoint2dCP
Definition: msgeomstructs_typedefs.h:78
PlotPathOperator
Printer driver output path operator.
Definition: IPrinterDriver.h:82
Printer driver output raster event parameters.
Definition: IPrinterDriver.h:245
Definition: DgnPlatform.r.h:339
Printer driver DriverEndPlot event parameters.
Definition: IPrinterDriver.h:317
Definition: DgnPlatform.r.h:331
ByteMap (same as IMAGEFORMAT_ByteMap)

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.