QCAD
Open Source 2D CAD
RPainterPathExporter.h
Go to the documentation of this file.
1 
20 #ifndef RPAINTERPATHEXPORTER_H
21 #define RPAINTERPATHEXPORTER_H
22 
23 #include "core_global.h"
24 
25 #include "RArc.h"
26 #include "RExporter.h"
27 #include "RPainterPath.h"
28 #include "RRay.h"
29 #include "RXLine.h"
30 
35 public:
36  RPainterPathExporter() : RExporter(), exportZeroLinesAsPoints(true) { }
37 
38  virtual void exportLineSegment(const RLine& line, double angle = RNANDOUBLE);
39  virtual void exportPainterPaths(const QList<RPainterPath>& paths);
40 
41  virtual void exportXLine(const RXLine& xLine) {
42  Q_UNUSED(xLine)
43  }
44 
45  virtual void exportRay(const RRay& ray) {
46  Q_UNUSED(ray)
47  }
48 
49  virtual void exportPoint(const RPoint& point) {
50  Q_UNUSED(point)
51  }
52  virtual void exportArcSegment(const RArc& arc, bool allowForZeroLength = false) {
53  Q_UNUSED(arc)
54  Q_UNUSED(allowForZeroLength)
55  }
56  virtual void exportTriangle(const RTriangle& triangle) {
57  Q_UNUSED(triangle)
58  }
59 
60  //void clear();
61  RPainterPath getPainterPath();
63  exportZeroLinesAsPoints = on;
64  }
65 
66 private:
69 };
70 
71 #endif
virtual void exportPainterPaths(const QList< RPainterPath > &paths)
Definition: RExporter.cpp:1392
void setExportZeroLinesAsPoints(bool on)
Definition: RPainterPathExporter.h:62
virtual void exportArcSegment(const RArc &arc, bool allowForZeroLength=false)
Definition: RPainterPathExporter.h:52
virtual void exportXLine(const RXLine &xLine)
Exports an infinite line.
Definition: RPainterPathExporter.h:41
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)=0
Exports a line segment (a line without pattern).
Low-level mathematical representation of a triangle.
Definition: RTriangle.h:46
Low-level mathematical representation of an arc.
Definition: RArc.h:41
virtual void exportPoint(const RPoint &point)
Exports a point with the current attributes.
Definition: RPainterPathExporter.h:49
#define QCADCORE_EXPORT
Definition: core_global.h:10
virtual void exportRay(const RRay &ray)
Exports an infinite ray.
Definition: RPainterPathExporter.h:45
#define RNANDOUBLE
Definition: RMath.h:55
RPainterPathExporter()
Definition: RPainterPathExporter.h:36
Extended painter path with a z-level and a pen.
Definition: RPainterPath.h:45
Low-level mathematical representation of an infinite line.
Definition: RXLine.h:42
Low-level mathematical representation of a line.
Definition: RLine.h:42
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPoint.h:38
Abstract base class for exporters.
Definition: RExporter.h:63
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RPainterPathExporter.h:34
RPainterPath path
Definition: RPainterPathExporter.h:67
Low-level mathematical representation of a ray.
Definition: RRay.h:42
virtual void exportTriangle(const RTriangle &triangle)
Exports a triangle with the current attributes.
Definition: RPainterPathExporter.h:56
bool exportZeroLinesAsPoints
Definition: RPainterPathExporter.h:68