QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
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 "RExporter.h"
26#include "RPainterPath.h"
27#include "RRay.h"
28#include "RXLine.h"
29
30class RPoint;
31class RTriangle;
32
37public:
39 RExporter(), exportZeroLinesAsPoints(true), ignoreZeroLines(false), ignoreLineTypePatternScale(false), scaleHint(1.0) { }
40
42 RExporter(doc), exportZeroLinesAsPoints(true), ignoreZeroLines(false), ignoreLineTypePatternScale(false), scaleHint(1.0) { }
43
44 virtual void exportLineSegment(const RLine& line, double angle = RNANDOUBLE);
45 virtual void exportPainterPaths(const QList<RPainterPath>& paths, double z = 0.0);
46
47 virtual void exportXLine(const RXLine& xLine) {
48 Q_UNUSED(xLine)
49 }
50
51 virtual void exportRay(const RRay& ray) {
52 Q_UNUSED(ray)
53 }
54
55 virtual void exportPoint(const RPoint& point) {
56 // MSVC:
57 //Q_UNUSED(point)
58 }
59 virtual void exportTriangle(const RTriangle& triangle) {
60 //Q_UNUSED(triangle)
61 }
62
63 //void clear();
64 RPainterPath getPainterPath();
66 exportZeroLinesAsPoints = on;
67 }
68 void setIgnoreZeroLines(bool on) {
69 ignoreZeroLines = on;
70 }
72 ignoreLineTypePatternScale = on;
73 }
78 void setScaleHint(double s) {
79 scaleHint = s;
80 }
81
82 virtual double getLineTypePatternScale(const RLinetypePattern& p) const;
83
84private:
89 double scaleHint;
90};
91
92#endif
#define RNANDOUBLE
Definition RMath.h:74
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Abstract base class for exporters.
Definition RExporter.h:78
virtual void exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)
Definition RExporter.cpp:1640
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)=0
Exports a line segment (a line without pattern).
virtual double getLineTypePatternScale(const RLinetypePattern &p) const
Definition RExporter.cpp:1694
Low-level mathematical representation of a line.
Definition RLine.h:41
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLinetypePattern.h:42
Exports all exported geometry into one painter path.
Definition RPainterPathExporter.h:36
void setExportZeroLinesAsPoints(bool on)
Definition RPainterPathExporter.h:65
double scaleHint
Definition RPainterPathExporter.h:89
RPainterPathExporter(RDocument &doc)
Definition RPainterPathExporter.h:41
bool ignoreLineTypePatternScale
Definition RPainterPathExporter.h:88
virtual void exportRay(const RRay &ray)
Exports an infinite ray.
Definition RPainterPathExporter.h:51
void setIgnoreLineTypePatternScale(bool on)
Definition RPainterPathExporter.h:71
virtual void exportXLine(const RXLine &xLine)
Exports an infinite line.
Definition RPainterPathExporter.h:47
bool exportZeroLinesAsPoints
Definition RPainterPathExporter.h:86
bool ignoreZeroLines
Definition RPainterPathExporter.h:87
RPainterPath path
Definition RPainterPathExporter.h:85
RPainterPathExporter()
Definition RPainterPathExporter.h:38
void setIgnoreZeroLines(bool on)
Definition RPainterPathExporter.h:68
virtual void exportPoint(const RPoint &point)
Exports a point with the current attributes.
Definition RPainterPathExporter.h:55
void setScaleHint(double s)
setScaleHint Set additional pattern scale hint, used for scaling dots in patterns in viewports.
Definition RPainterPathExporter.h:78
virtual void exportTriangle(const RTriangle &triangle)
Exports a triangle with the current attributes.
Definition RPainterPathExporter.h:59
Extended painter path with a z-level and a pen.
Definition RPainterPath.h:48
Low-level mathematical representation of a point.
Definition RPoint.h:40
Low-level mathematical representation of a ray.
Definition RRay.h:41
Low-level mathematical representation of a triangle.
Definition RTriangle.h:49
Low-level mathematical representation of an infinite line.
Definition RXLine.h:42
#define QCADCORE_EXPORT
Definition core_global.h:10
char s
Definition opennurbs_string.cpp:32
#define true
Definition opennurbs_system.h:248
#define false
Definition opennurbs_system.h:252