67#define RDEFAULT_MIN1 -1
90 QString getErrorMessage()
const;
104 virtual void setClipping(
bool on);
105 bool getClipping()
const;
107 virtual void setWipeout(
bool on);
108 bool getWipeout()
const;
110 virtual void setFrameless(
bool on);
111 bool getFrameless()
const;
113 virtual void setPen(
const QPen& pen);
115 virtual QPen getPen();
116 virtual void setBrush(
const QBrush& brush);
118 virtual QBrush getBrush();
121 virtual RColor getColor(
bool resolve);
123 virtual void setEntityAttributes(
bool forceSelected=
false);
125 virtual void setStyle(Qt::PenStyle penStyle);
126 virtual void setBrushStyle(Qt::BrushStyle brushStyle);
127 virtual void setDashPattern(
const QVector<qreal>& dashes);
129 virtual void setColor(
float r,
float g,
float b,
float a = 1.0f);
130 virtual void setColor(
const RColor& color);
138 virtual QSharedPointer<REntity> getBlockRefOrEntity();
140 virtual QSharedPointer<REntity> getEntity();
141 virtual QSharedPointer<REntity> getCurrentBlockRef()
const;
142 virtual QSharedPointer<RViewportEntity> getCurrentViewport()
const;
143 virtual QStack<QSharedPointer<REntity> > getBlockRefViewportStack()
const;
148 virtual QSharedPointer<REntity> getEntity()
const;
150 virtual bool isEntitySelected();
153 virtual void startExport();
154 virtual void endExport();
156 virtual bool exportDocument();
157 virtual bool exportDocumentSettings();
158 virtual void exportDocumentSetting(
const QString& key,
const QVariant& value,
const QString& dictionaryName =
"QCAD_OBJECTS");
160 virtual void exportIntListWithName(
const QString& dictionaryName,
const QString& name,
const QString& listName, QList<int64_t>& values);
162 virtual void exportLayers();
163 virtual void exportLayerStates();
164 virtual void exportBlocks();
165 virtual void exportViews();
166 virtual void exportLinetypes();
177 virtual void exportEntities(
bool allBlocks =
true,
bool undone =
false,
bool invisible =
false);
178 virtual void exportEntities(
const RBox& box);
179 virtual void exportEntities(QSet<RObject::Id>& entityIds,
bool allBlocks =
true);
180 virtual void exportEntity(QSharedPointer<REntity> entity,
bool preview =
false,
bool allBlocks =
true,
bool forceSelected =
false,
bool invisible =
false);
181 virtual void exportEntity(
RObject::Id entityId,
bool allBlocks =
true,
bool forceSelected =
false);
182 virtual QSharedPointer<RLayer> getEntityLayer(QSharedPointer<REntity> entity);
183 virtual bool isVisible(QSharedPointer<REntity> entity);
186 virtual void exportCurrentEntity(
bool preview =
false,
bool forceSelected =
false);
189 virtual void exportShapes(
const QList<QSharedPointer<RShape> >& shapes);
190 virtual void exportShape(QSharedPointer<RShape> shape);
191 virtual void exportShapeSegment(QSharedPointer<RShape> shape,
double angle);
196 virtual double exportLine(
const RLine& line,
double offset =
RNANDOUBLE);
201 virtual bool exportLinetypeShape(QList<RPainterPath>& pps,
const RLine& line,
double total,
double length,
double angle,
const RVector& cursor);
225 virtual void exportCircle(
const RCircle& circle);
227 virtual void exportArc(
const RArc& arc,
double offset =
RNANDOUBLE);
229 virtual void exportArcSegment(
const RArc& arc,
bool allowForZeroLength =
false);
233 virtual void exportPolyline(
const RPolyline& polyline,
bool polylineGen =
true,
double offset =
RNANDOUBLE);
237 virtual void exportSplineSegment(
const RSpline& spline);
247 virtual void exportPainterPathSource(
const RPainterPathSource& pathSource,
double z = 0.0);
249 virtual void exportPainterPaths(
const QList<RPainterPath>& paths,
double z = 0.0);
250 virtual void exportPainterPaths(
const QList<RPainterPath>& paths,
double angle,
const RVector& pos);
252 virtual void exportBoundingBoxPaths(
const QList<RPainterPath>& paths);
254 virtual void exportImage(
const RImageData& image,
bool forceSelected =
false);
255 virtual QList<RPainterPath> exportText(
const RTextBasedData& text,
bool forceSelected =
false);
256 virtual void exportClipRectangle(
const RBox& clipRectangle,
bool forceSelected =
false);
257 virtual void clearClipRectangles();
258 virtual void exportTransform(
const RTransform& t);
259 virtual void exportEndTransform();
261 virtual void exportThickPolyline(
const RPolyline& polyline);
275 virtual void exportQuad(
282 virtual void exportVerticalQuad(
288 virtual void exportBox(
const RBox& box);
295 virtual void exportRectangle(
const RVector& p1,
const RVector& p2);
302 virtual bool isTextRenderedAsText()
const;
304 QStack<QSharedPointer<REntity> > getEntityStack();
306 void pushEntity(QSharedPointer<REntity> e);
309 void setDraftMode(
bool on);
312 setDraftMode(!draftMode);
320 twoColorSelectedMode = on;
324 return twoColorSelectedMode;
327 void setScreenBasedLinetypes(
bool on);
330 setScreenBasedLinetypes(!screenBasedLinetypes);
334 return screenBasedLinetypes;
342 return visualExporter;
350 return exportInvisible;
354 exportInvisible = on;
358 return pixelSizeHint;
361 virtual double getCurrentPixelSizeHint()
const;
void init(void basePath)
Definition AddBlockInit.js:2
#define RNANDOUBLE
Definition RMath.h:74
Q_DECLARE_METATYPE(RMath *)
Low-level mathematical representation of an arc.
Definition RArc.h:42
Represents a block definition in a drawing.
Definition RBlock.h:42
Represents a box e.g.
Definition RBox.h:46
Low-level mathematical representation of a circle.
Definition RCircle.h:41
Color.
Definition RColor.h:43
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Low-level mathematical representation of an ellipse or ellipse arc.
Definition REllipse.h:43
Base class for all entity classes.
Definition REntity.h:63
Interface for explodable shape classes.
Definition RExplodable.h:40
Abstract base class for exporters.
Definition RExporter.h:78
bool getPixelWidth() const
Definition RExporter.h:375
virtual void exportRay(const RRay &ray)=0
Exports an infinite ray.
bool draftMode
Definition RExporter.h:406
RLayer * currentLayer
Definition RExporter.h:402
QPen currentPen
Definition RExporter.h:398
virtual void exportLayerState(QSharedPointer< RLayerState >)
Definition RExporter.h:170
virtual void exportTriangle(const RTriangle &triangle)=0
Exports a triangle with the current attributes.
bool pixelUnit
Definition RExporter.h:413
Qt::PenCapStyle penCapStyle
Definition RExporter.h:418
bool wipeout
Definition RExporter.h:415
RDocument * layerSource
Definition RExporter.h:404
virtual void exportPoint(const RPoint &point)=0
Exports a point with the current attributes.
double pixelSizeHint
Definition RExporter.h:412
QTransform transform
Definition RExporter.h:397
bool enablePatterns
Definition RExporter.h:419
RLinetypePattern currentLinetypePattern
Definition RExporter.h:399
RDocument * document
Definition RExporter.h:396
bool pixelWidth
Definition RExporter.h:417
virtual void exportBlock(QSharedPointer< RBlock >)
Definition RExporter.h:171
bool visualExporter
Definition RExporter.h:409
void toggleScreenBasedLinetypes()
Definition RExporter.h:329
void toggleDraftMode()
Definition RExporter.h:311
virtual void exportXLine(const RXLine &xLine)=0
Exports an infinite line.
RDocument * blockSource
Definition RExporter.h:405
virtual void exportLinetype(QSharedPointer< RLinetype >)
Definition RExporter.h:175
QString errorMessage
Definition RExporter.h:411
QBrush currentBrush
Definition RExporter.h:400
double getPixelSizeHint() const
Definition RExporter.h:357
QStack< QSharedPointer< REntity > > blockRefViewportStack
Definition RExporter.h:403
void setEnablePatterns(bool on)
Definition RExporter.h:383
bool exportInvisible
Definition RExporter.h:410
bool frameless
Definition RExporter.h:416
bool getDraftMode() const
Definition RExporter.h:315
virtual void exportEntities(QSet< RObject::Id > &entityIds, bool allBlocks=true)
bool clipping
Definition RExporter.h:414
QStack< QSharedPointer< REntity > > entityStack
Definition RExporter.h:401
void setPixelWidth(bool on)
Definition RExporter.h:379
void setVisualExporter(bool on)
Definition RExporter.h:345
void setPixelSizeHint(double v)
Definition RExporter.h:363
bool isVisualExporter() const
Definition RExporter.h:341
virtual void exportView(QSharedPointer< RView >)
Definition RExporter.h:173
virtual void startEntity(bool)
Definition RExporter.h:184
virtual void exportLineSegment(const RLine &line, double angle=RNANDOUBLE)=0
Exports a line segment (a line without pattern).
virtual void exportLayer(QSharedPointer< RLayer >)
Definition RExporter.h:168
bool twoColorSelectedMode
Definition RExporter.h:407
bool getExportInvisible() const
Definition RExporter.h:349
virtual void endEntity(bool)
Definition RExporter.h:185
bool screenBasedLinetypes
Definition RExporter.h:408
void setTwoColorSelectedMode(bool on)
Definition RExporter.h:319
void setExportInvisible(bool on)
Definition RExporter.h:353
RS::ProjectionRenderingHint projectionRenderingHint
Definition RExporter.h:423
bool getTwoColorSelectedMode() const
Definition RExporter.h:323
bool getPixelUnit() const
Definition RExporter.h:367
virtual bool getScreenBasedLinetypes() const
Definition RExporter.h:333
void setPixelUnit(bool on)
Definition RExporter.h:371
Stores and manages all data that defines the geometry and appearance of a raster image entity.
Definition RImageData.h:41
Represents a layer in a drawing.
Definition RLayer.h:45
Represents a layer state (state of list of layers) in a drawing.
Definition RLayerState.h:37
Low-level mathematical representation of a line.
Definition RLine.h:41
Represents a linetype in a drawing.
Definition RLinetype.h:45
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLinetypePattern.h:42
Lineweight
Definition RLineweight.h:44
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RMessageHandler.h:33
int Id
Definition RObject.h:69
Extended painter path with a z-level and a pen.
Definition RPainterPath.h:48
Interface for entity data classes that can deliver painter paths.
Definition RPainterPathSource.h:40
Low-level mathematical representation of a point.
Definition RPoint.h:40
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition RPolyline.h:50
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RProgressHandler.h:33
Low-level mathematical representation of a ray.
Definition RRay.h:41
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition RS.h:293
Low-level mathematical representation of a spline.
Definition RSpline.h:59
Stores and manages all data that defines the geometry and appearance of a text based entity (text,...
Definition RTextBasedData.h:68
Low-level mathematical representation of a triangle.
Definition RTriangle.h:49
Represents a 3d vector (x/y/z).
Definition RVector.h:47
Represents a view in a drawing.
Definition RView.h:41
Viewport entity.
Definition RViewportEntity.h:38
Low-level mathematical representation of an infinite line.
Definition RXLine.h:42
#define QCADCORE_EXPORT
Definition core_global.h:10
void getDocument()
Returns the current RDocument or undefined.
Definition simple.js:63
#define NULL
Definition opennurbs_system.h:256