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 exportTriangle(const RTriangle& triangle) {
53  Q_UNUSED(triangle)
54  }
55 
56  //void clear();
57  RPainterPath getPainterPath();
59  exportZeroLinesAsPoints = on;
60  }
61 
62 private:
65 };
66 
67 #endif
virtual void exportPainterPaths(const QList< RPainterPath > &paths)
Definition: RExporter.cpp:1529
void setExportZeroLinesAsPoints(bool on)
Definition: RPainterPathExporter.h:58
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
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:71
RPainterPathExporter()
Definition: RPainterPathExporter.h:36
Extended painter path with a z-level and a pen.
Definition: RPainterPath.h:46
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-2016 by Andrew Mustun.
Definition: RPoint.h:38
Abstract base class for exporters.
Definition: RExporter.h:71
Copyright (c) 2011-2016 by Andrew Mustun.
Definition: RPainterPathExporter.h:34
RPainterPath path
Definition: RPainterPathExporter.h:63
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:52
bool exportZeroLinesAsPoints
Definition: RPainterPathExporter.h:64