Skip to content

RLinetypePatternExporter

Class in Core Module
Header: #include <src/core/RLinetypePatternExporter.h>
Inherits: RExporter
Nested classes: SplineDistTable

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.

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)
const SplineDistTable * getSplineTable(int i)
static double lookupT(const SplineDistTable &table, double dist)
RExporter & exporter
std::vector< double > lengthAt
QList< QSharedPointer< RShape > > shapes
QMap< int, SplineDistTable > splineTables

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 RPainterPathExporter
  • shapes: Shapes to be exported as connected shapes with continuous line pattern.
  • offset: Offset into the line type pattern.

RLinetypePatternExporter::RLinetypePatternExporter(RExporter &exporter, const QSharedPointer< RShape > &shape, double offset)

Constructor.

Parameters:

  • exporter: Exporter to which the shapes are exported, e.g. a RPainterPathExporter
  • shape: Shape to be exported as connected shapes with continuous line pattern.
  • offset: Offset into the line type pattern.

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.

virtual void RLinetypePatternExporter::exportPainterPaths(const QList< RPainterPath > &paths, double angle, const RVector &pos)

virtual

Reimplemented from exportPainterPaths.

virtual void RLinetypePatternExporter::exportPainterPaths(const QList< RPainterPath > &paths, double z=0.0)

virtual inline

Reimplemented from exportPainterPaths.

virtual void RLinetypePatternExporter::exportPoint(const RPoint &)

virtual inline

Exports a point with the current attributes.

Reimplemented from exportPoint.

virtual void RLinetypePatternExporter::exportRay(const RRay &)

virtual inline

Exports an infinite ray.

Used for rays.

Reimplemented from exportRay.

void RLinetypePatternExporter::exportShapesBetween(int i1, const RVector &p1, int i2, const RVector &p2, double angle, double d1=RNANDOUBLE, double d2=RNANDOUBLE)

virtual void RLinetypePatternExporter::exportTriangle(const RTriangle &)

virtual inline

Exports a triangle with the current attributes.

Reimplemented from exportTriangle.

virtual void RLinetypePatternExporter::exportXLine(const RXLine &)

virtual inline

Exports an infinite line.

Used for xlines (construction lines).

Reimplemented from exportXLine.

double RLinetypePatternExporter::getAngleAt(double d)

virtual RLinetypePattern RLinetypePatternExporter::getLinetypePattern()

virtual inline

Reimplemented from getLinetypePattern.

virtual double RLinetypePatternExporter::getLineTypePatternScale(const RLinetypePattern &p) const

virtual inline const

Reimplemented from getLineTypePatternScale.

RVector RLinetypePatternExporter::getPointAt(double d, int *index=NULL)

int RLinetypePatternExporter::getShapeAt(double d)

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.

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.

RExporter& RLinetypePatternExporter::exporter

private

std::vector<double> RLinetypePatternExporter::lengthAt

private

QList<QSharedPointer<RShape> > RLinetypePatternExporter::shapes

private

QMap<int, SplineDistTable> RLinetypePatternExporter::splineTables

private