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 
40  RExporter(doc), exportZeroLinesAsPoints(true), ignoreZeroLines(false) { }
41 
42  virtual void exportLineSegment(const RLine& line, double angle = RNANDOUBLE);
43  virtual void exportPainterPaths(const QList<RPainterPath>& paths, double z = 0.0);
44 
45  virtual void exportXLine(const RXLine& xLine) {
46  Q_UNUSED(xLine)
47  }
48 
49  virtual void exportRay(const RRay& ray) {
50  Q_UNUSED(ray)
51  }
52 
53  virtual void exportPoint(const RPoint& point) {
54  Q_UNUSED(point)
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  void setIgnoreZeroLines(bool on) {
66  ignoreZeroLines = on;
67  }
69  ignoreLineTypePatternScale = on;
70  }
71 
72  virtual double getLineTypePatternScale(const RLinetypePattern& p) const;
73 
74 private:
79 };
80 
81 #endif
RPainterPathExporter::exportPoint
virtual void exportPoint(const RPoint &point)
Exports a point with the current attributes.
Definition: RPainterPathExporter.h:53
RPainterPathExporter::setIgnoreLineTypePatternScale
void setIgnoreLineTypePatternScale(bool on)
Definition: RPainterPathExporter.h:68
RPainterPathExporter::RPainterPathExporter
RPainterPathExporter(RDocument &doc)
Definition: RPainterPathExporter.h:39
RPainterPathExporter::exportRay
virtual void exportRay(const RRay &ray)
Exports an infinite ray.
Definition: RPainterPathExporter.h:49
RExporter::exportPainterPaths
virtual void exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)
Definition: RExporter.cpp:1598
RPainterPathExporter::setExportZeroLinesAsPoints
void setExportZeroLinesAsPoints(bool on)
Definition: RPainterPathExporter.h:62
RPoint
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPoint.h:38
RPainterPathExporter::exportTriangle
virtual void exportTriangle(const RTriangle &triangle)
Exports a triangle with the current attributes.
Definition: RPainterPathExporter.h:56
RXLine.h
RPainterPathExporter::RPainterPathExporter
RPainterPathExporter()
Definition: RPainterPathExporter.h:36
RRay.h
RPainterPathExporter::ignoreZeroLines
bool ignoreZeroLines
Definition: RPainterPathExporter.h:77
RPainterPathExporter
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RPainterPathExporter.h:34
RLine
Low-level mathematical representation of a line.
Definition: RLine.h:41
RPainterPathExporter::ignoreLineTypePatternScale
bool ignoreLineTypePatternScale
Definition: RPainterPathExporter.h:78
RNANDOUBLE
#define RNANDOUBLE
Definition: RMath.h:71
RExporter::exportLineSegment
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)=0
Exports a line segment (a line without pattern).
core_global.h
RExporter
Abstract base class for exporters.
Definition: RExporter.h:72
RPainterPath
Extended painter path with a z-level and a pen.
Definition: RPainterPath.h:46
RLinetypePattern
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RLinetypePattern.h:45
RDocument
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition: RDocument.h:72
RExporter.h
RRay
Low-level mathematical representation of a ray.
Definition: RRay.h:42
RTriangle
Low-level mathematical representation of a triangle.
Definition: RTriangle.h:46
RExporter::getLineTypePatternScale
virtual double getLineTypePatternScale(const RLinetypePattern &p) const
Definition: RExporter.cpp:1641
RXLine
Low-level mathematical representation of an infinite line.
Definition: RXLine.h:42
RPainterPathExporter::exportXLine
virtual void exportXLine(const RXLine &xLine)
Exports an infinite line.
Definition: RPainterPathExporter.h:45
RArc.h
RPainterPathExporter::exportZeroLinesAsPoints
bool exportZeroLinesAsPoints
Definition: RPainterPathExporter.h:76
RPainterPathExporter::path
RPainterPath path
Definition: RPainterPathExporter.h:75
RPainterPath.h
QCADCORE_EXPORT
#define QCADCORE_EXPORT
Definition: core_global.h:10
RPainterPathExporter::setIgnoreZeroLines
void setIgnoreZeroLines(bool on)
Definition: RPainterPathExporter.h:65