RLinetypePatternExporter
Class in Core Module
Header: #include <src/core/RLinetypePatternExporter.h>
Inherits: RExporter
Nested classes: SplineDistTable
Description
Section titled “Description”All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD. Exports a list of given shapes, for example from exploded polylines or splines as a continuous line pattern.
Public Functions
Section titled “Public Functions”RLinetypePatternExporter(RExporter &exporter, const QList< QSharedPointer< RShape > > &shapes, double offset) |
|
RLinetypePatternExporter(RExporter &exporter, const QSharedPointer< RShape > &shape, double offset)Constructor. |
|
| virtual void | exportLineSegment(const RLine &line, double angle=RNANDOUBLE)Exports the given line segment, mapped to the shapes that are being exported. |
| virtual void | exportPainterPaths(const QList< RPainterPath > &paths, double angle, const RVector &pos) |
| virtual void | exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0) |
| virtual void | exportPoint(const RPoint &)Exports a point with the current attributes. |
| virtual void | exportRay(const RRay &)Exports an infinite ray. |
| void | exportShapesBetween(int i1, const RVector &p1, int i2, const RVector &p2, double angle, double d1=RNANDOUBLE, double d2=RNANDOUBLE) |
| virtual void | exportTriangle(const RTriangle &)Exports a triangle with the current attributes. |
| virtual void | exportXLine(const RXLine &)Exports an infinite line. |
| double | getAngleAt(double d) |
| virtual RLinetypePattern | getLinetypePattern() |
| virtual double | getLineTypePatternScale(const RLinetypePattern &p) const |
| RVector | getPointAt(double d, int *index=NULL) |
| int | getShapeAt(double d) |
Private Functions
Section titled “Private Functions”| const SplineDistTable * | getSplineTable(int i) |
Static Private Functions
Section titled “Static Private Functions”| static double | lookupT(const SplineDistTable &table, double dist) |
Private Attributes
Section titled “Private Attributes”| RExporter & | exporter |
| std::vector< double > | lengthAt |
| QList< QSharedPointer< RShape > > | shapes |
| QMap< int, SplineDistTable > | splineTables |
Member Documentation
Section titled “Member Documentation”RLinetypePatternExporter
Section titled “RLinetypePatternExporter”RLinetypePatternExporter::RLinetypePatternExporter(RExporter &exporter, const QList< QSharedPointer< RShape > > &shapes, double offset)All rights reserved.
This file is part of the QCAD project.
QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with QCAD. Constructor.
Parameters:
exporter: Exporter to which the shapes are exported, e.g. a RPainterPathExportershapes: Shapes to be exported as connected shapes with continuous line pattern.offset: Offset into the line type pattern.
RLinetypePatternExporter
Section titled “RLinetypePatternExporter”RLinetypePatternExporter::RLinetypePatternExporter(RExporter &exporter, const QSharedPointer< RShape > &shape, double offset)Constructor.
Parameters:
exporter: Exporter to which the shapes are exported, e.g. a RPainterPathExportershape: Shape to be exported as connected shapes with continuous line pattern.offset: Offset into the line type pattern.
exportLineSegment
Section titled “exportLineSegment”virtual void RLinetypePatternExporter::exportLineSegment(const RLine &line, double angle=RNANDOUBLE)virtual
Exports the given line segment, mapped to the shapes that are being exported.
Parameters:
line: Line segment, mapped to the straight, horizontal line starting at 0/0).angle: Always 0.0.
Reimplemented from exportLineSegment.
exportPainterPaths
Section titled “exportPainterPaths”virtual void RLinetypePatternExporter::exportPainterPaths(const QList< RPainterPath > &paths, double angle, const RVector &pos)virtual
Reimplemented from exportPainterPaths.
exportPainterPaths
Section titled “exportPainterPaths”virtual void RLinetypePatternExporter::exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)virtual inline
Reimplemented from exportPainterPaths.
exportPoint
Section titled “exportPoint”virtual void RLinetypePatternExporter::exportPoint(const RPoint &)virtual inline
Exports a point with the current attributes.
Reimplemented from exportPoint.
exportRay
Section titled “exportRay”virtual void RLinetypePatternExporter::exportRay(const RRay &)virtual inline
Exports an infinite ray.
Used for rays.
Reimplemented from exportRay.
exportShapesBetween
Section titled “exportShapesBetween”void RLinetypePatternExporter::exportShapesBetween(int i1, const RVector &p1, int i2, const RVector &p2, double angle, double d1=RNANDOUBLE, double d2=RNANDOUBLE)exportTriangle
Section titled “exportTriangle”virtual void RLinetypePatternExporter::exportTriangle(const RTriangle &)virtual inline
Exports a triangle with the current attributes.
Reimplemented from exportTriangle.
exportXLine
Section titled “exportXLine”virtual void RLinetypePatternExporter::exportXLine(const RXLine &)virtual inline
Exports an infinite line.
Used for xlines (construction lines).
Reimplemented from exportXLine.
getAngleAt
Section titled “getAngleAt”double RLinetypePatternExporter::getAngleAt(double d)getLinetypePattern
Section titled “getLinetypePattern”virtual RLinetypePattern RLinetypePatternExporter::getLinetypePattern()virtual inline
Reimplemented from getLinetypePattern.
getLineTypePatternScale
Section titled “getLineTypePatternScale”virtual double RLinetypePatternExporter::getLineTypePatternScale(const RLinetypePattern &p) constvirtual inline const
Reimplemented from getLineTypePatternScale.
getPointAt
Section titled “getPointAt”RVector RLinetypePatternExporter::getPointAt(double d, int *index=NULL)getShapeAt
Section titled “getShapeAt”int RLinetypePatternExporter::getShapeAt(double d)getSplineTable
Section titled “getSplineTable”const RLinetypePatternExporter::SplineDistTable * RLinetypePatternExporter::getSplineTable(int i)private
Returns: Cached arc length table for shape at index i or NULL if the shape is not a spline. The table is built on first use.
lookupT
Section titled “lookupT”static double RLinetypePatternExporter::lookupT(const SplineDistTable &table, double dist)static private
Returns: Spline parameter for the given distance from the start of the spline, interpolated from the given arc length table.
exporter
Section titled “exporter”RExporter& RLinetypePatternExporter::exporterprivate
lengthAt
Section titled “lengthAt”std::vector<double> RLinetypePatternExporter::lengthAtprivate
shapes
Section titled “shapes”QList<QSharedPointer<RShape> > RLinetypePatternExporter::shapesprivate
splineTables
Section titled “splineTables”QMap<int, SplineDistTable> RLinetypePatternExporter::splineTablesprivate