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:
37  RExporter(), exportZeroLinesAsPoints(true), ignoreZeroLines(false) { }
38 
39  virtual void exportLineSegment(const RLine& line, double angle = RNANDOUBLE);
40  virtual void exportPainterPaths(const QList<RPainterPath>& paths);
41 
42  virtual void exportXLine(const RXLine& xLine) {
43  Q_UNUSED(xLine)
44  }
45 
46  virtual void exportRay(const RRay& ray) {
47  Q_UNUSED(ray)
48  }
49 
50  virtual void exportPoint(const RPoint& point) {
51  Q_UNUSED(point)
52  }
53  virtual void exportTriangle(const RTriangle& triangle) {
54  Q_UNUSED(triangle)
55  }
56 
57  //void clear();
58  RPainterPath getPainterPath();
60  exportZeroLinesAsPoints = on;
61  }
62  void setIgnoreZeroLines(bool on) {
63  ignoreZeroLines = on;
64  }
65 
66 private:
70 };
71 
72 #endif
virtual void exportPainterPaths(const QList< RPainterPath > &paths)
Definition: RExporter.cpp:1557
bool ignoreZeroLines
Definition: RPainterPathExporter.h:69
void setExportZeroLinesAsPoints(bool on)
Definition: RPainterPathExporter.h:59
virtual void exportXLine(const RXLine &xLine)
Exports an infinite line.
Definition: RPainterPathExporter.h:42
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
void setIgnoreZeroLines(bool on)
Definition: RPainterPathExporter.h:62
virtual void exportPoint(const RPoint &point)
Exports a point with the current attributes.
Definition: RPainterPathExporter.h:50
#define QCADCORE_EXPORT
Definition: core_global.h:10
virtual void exportRay(const RRay &ray)
Exports an infinite ray.
Definition: RPainterPathExporter.h:46
#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:41
Copyright (c) 2011-2017 by Andrew Mustun.
Definition: RPoint.h:38
Abstract base class for exporters.
Definition: RExporter.h:71
Copyright (c) 2011-2017 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:53
bool exportZeroLinesAsPoints
Definition: RPainterPathExporter.h:68