RPainterPath
Class in Core Module
Header: #include <src/core/RPainterPath.h>
Inherits: QPainterPath
Description
Section titled “Description”Extended painter path with a z-level and a pen.
Scriptable: This class is available in script environments.
Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.
Public Types
Section titled “Public Types”| enum | Mode { NoModes, Selected, Highlighted, Invalid, FixedPenColor, FixedBrushColor, AutoRegen, AlwaysRegen, InheritPen, PixelUnit, NoClipping, PixelWidth, NoColorMode, SimplePointDisplay, PolylineGen, NoPattern, ScreenBasedLinetype, Wipeout, Frameless } |
Public Functions
Section titled “Public Functions”RPainterPath() |
|
RPainterPath(const QPainterPath &path) |
|
RPainterPath(const RPainterPath &other) |
|
| virtual | ~RPainterPath() |
| void | addArc(const RArc &arc) |
| void | addBox(const RBox &box) |
| void | addLine(const RLine &line) |
| void | addOriginalShape(QSharedPointer< RShape > shape) |
| void | addPath(const RPainterPath &path) |
| void | addPoint(const RVector &position) |
| void | addPolyline(const RPolyline &pl) |
| void | addRect(const QRectF &rect)Fixes crashing QPainterPath::addRect. |
| void | addRect(double x1, double y1, double x2, double y2) |
| void | addShape(QSharedPointer< RShape > shape) |
| void | addSpline(const RSpline &spline) |
| void | appendPath(const RPainterPath &path) |
| void | closeSubpath() |
| bool | containsPoint(const RVector &v) const |
| int | countOriginalShapes() const |
| void | cubicTo(const RVector &cp1, const RVector &cp2, const RVector &v) |
| void | cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, qreal endPtx, qreal endPty) |
| bool | getAlwaysRegen() const |
| bool | getAutoRegen() const |
| RBox | getBoundingBox() const |
| QBrush | getBrush() const |
| RVector | getCurrentPosition() const |
| double | getDistanceTo(const RVector &point) const |
| int | getElementCount() const |
| RVector | getEndPoint() const |
| double | getFeatureSize() const |
| bool | getFrameless() const |
| bool | getInheritPen() const |
| bool | getMode(RPainterPath::Mode mode) const |
| bool | getNoClipping() const |
| bool | getNoColorMode() const |
| bool | getNoPattern() const |
| QSharedPointer< RShape > | getOriginalShape(int i) const |
| QPen | getPen() const |
| double | getPixelSizeHint() const |
| bool | getPixelUnit() const |
| bool | getPixelWidth() const |
| QList< RVector > | getPoints() const |
| bool | getPolylineGen() const |
| bool | getScreenBasedLinetype() const |
| QList< QSharedPointer< RShape > > | getShapes() const |
| bool | getSimplePointDisplay() const |
| RVector | getStartPoint() const |
| QPainterPath::ElementType | getTypeAt(int i) const |
| bool | getWipeout() const |
| double | getXAt(int i) const |
| double | getYAt(int i) const |
| int | getZLevel() const |
| bool | hasOriginalShapes() const |
| bool | hasPoints() const |
| bool | isAtPosition(const RVector &p, double tolerance=RS::PointTolerance) const |
| bool | isEmpty() const |
| bool | isFixedBrushColor() const |
| bool | isFixedPenColor() const |
| bool | isHighlighted() const |
| bool | isSane() const |
| bool | isSelected() const |
| bool | isValid() const |
| void | lineTo(const QPointF &p) |
| void | lineTo(const RVector &v) |
| void | lineTo(qreal x, qreal y) |
| void | move(const RVector &offset) |
| void | moveTo(const QPointF &p) |
| void | moveTo(const RVector &v) |
| void | moveTo(qreal x, qreal y) |
| void | moveToOrNop(const RVector &v) |
| void | quadTo(const RVector &cp, const RVector &v) |
| void | quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty) |
| void | rotate(double angle) |
| void | scale(double fx, double fy) |
| void | setAlwaysRegen(bool on) |
| void | setAutoRegen(bool on) |
| void | setBrush(const QBrush &b) |
| void | setFeatureSize(double s) |
| void | setFixedBrushColor(bool on) |
| void | setFixedPenColor(bool on) |
| void | setFrameless(bool on) |
| void | setHighlighted(bool on) |
| void | setInheritPen(bool on) |
| void | setMode(RPainterPath::Mode mode, bool on=true) |
| void | setNoClipping(bool on) |
| void | setNoColorMode(bool on) |
| void | setNoPattern(bool on) |
| void | setPath(const QPainterPath &path) |
| void | setPen(const QPen &p)Sets the pen of this painter path. |
| void | setPixelSizeHint(double s) |
| void | setPixelUnit(bool on) |
| void | setPixelWidth(bool on) |
| void | setPoints(const QList< RVector > &p) |
| void | setPolylineGen(bool on) |
| void | setScreenBasedLinetype(bool on) |
| void | setSelected(bool on) |
| void | setSimplePointDisplay(bool on) |
| void | setValid(bool on) |
| void | setWipeout(bool on) |
| void | setZLevel(int zl)Sets the z-level of the painter path. |
| void | transform(const QTransform &t) |
Static Public Functions
Section titled “Static Public Functions”| static RVector | getMaxList(QList< RPainterPath > &pps) |
| static RVector | getMinList(QList< RPainterPath > &pps) |
| static void | rotateList(QList< RPainterPath > &pps, double angle) |
| static void | scaleList(QList< RPainterPath > &pps, double fx, double fy) |
| static void | translateList(QList< RPainterPath > &pps, const RVector &offset) |
Private Attributes
Section titled “Private Attributes”| QBrush | brush |
| double | featureSize |
| Modes | modes |
| QList< QSharedPointer< RShape > > | originalShapes |
| QPen | pen |
| double | pixelSizeHint |
| QList< RVector > | points |
| int | zLevel |
Member Documentation
Section titled “Member Documentation”enum ModeRPainterPath
Section titled “RPainterPath”RPainterPath::RPainterPath()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.
RPainterPath
Section titled “RPainterPath”RPainterPath::RPainterPath(const QPainterPath &path)RPainterPath
Section titled “RPainterPath”RPainterPath::RPainterPath(const RPainterPath &other)~RPainterPath
Section titled “~RPainterPath”virtual RPainterPath::~RPainterPath()virtual
addArc
Section titled “addArc”void RPainterPath::addArc(const RArc &arc)addBox
Section titled “addBox”void RPainterPath::addBox(const RBox &box)addLine
Section titled “addLine”void RPainterPath::addLine(const RLine &line)addOriginalShape
Section titled “addOriginalShape”void RPainterPath::addOriginalShape(QSharedPointer< RShape > shape)addPath
Section titled “addPath”void RPainterPath::addPath(const RPainterPath &path)addPoint
Section titled “addPoint”void RPainterPath::addPoint(const RVector &position)addPolyline
Section titled “addPolyline”void RPainterPath::addPolyline(const RPolyline &pl)addRect
Section titled “addRect”void RPainterPath::addRect(const QRectF &rect)Fixes crashing QPainterPath::addRect.
addRect
Section titled “addRect”void RPainterPath::addRect(double x1, double y1, double x2, double y2)addShape
Section titled “addShape”void RPainterPath::addShape(QSharedPointer< RShape > shape)addSpline
Section titled “addSpline”void RPainterPath::addSpline(const RSpline &spline)appendPath
Section titled “appendPath”void RPainterPath::appendPath(const RPainterPath &path)closeSubpath
Section titled “closeSubpath”void RPainterPath::closeSubpath()inline
containsPoint
Section titled “containsPoint”bool RPainterPath::containsPoint(const RVector &v) constinline const
countOriginalShapes
Section titled “countOriginalShapes”int RPainterPath::countOriginalShapes() constconst
cubicTo
Section titled “cubicTo”void RPainterPath::cubicTo(const RVector &cp1, const RVector &cp2, const RVector &v)inline
cubicTo
Section titled “cubicTo”void RPainterPath::cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, qreal endPtx, qreal endPty)inline
getAlwaysRegen
Section titled “getAlwaysRegen”bool RPainterPath::getAlwaysRegen() constconst
getAutoRegen
Section titled “getAutoRegen”bool RPainterPath::getAutoRegen() constconst
getBoundingBox
Section titled “getBoundingBox”RBox RPainterPath::getBoundingBox() constconst
getBrush
Section titled “getBrush”QBrush RPainterPath::getBrush() constconst
getCurrentPosition
Section titled “getCurrentPosition”RVector RPainterPath::getCurrentPosition() constinline const
getDistanceTo
Section titled “getDistanceTo”double RPainterPath::getDistanceTo(const RVector &point) constconst
Returns: Distance from this painter path to the given point.
This can be used for example to find out how close the visual representation of an entity is to the mouse cursor on the screen.
getElementCount
Section titled “getElementCount”int RPainterPath::getElementCount() constconst
getEndPoint
Section titled “getEndPoint”RVector RPainterPath::getEndPoint() constconst
getFeatureSize
Section titled “getFeatureSize”double RPainterPath::getFeatureSize() constconst
getFrameless
Section titled “getFrameless”bool RPainterPath::getFrameless() constconst
getInheritPen
Section titled “getInheritPen”bool RPainterPath::getInheritPen() constconst
getMode
Section titled “getMode”bool RPainterPath::getMode(RPainterPath::Mode mode) constconst
getNoClipping
Section titled “getNoClipping”bool RPainterPath::getNoClipping() constconst
getNoColorMode
Section titled “getNoColorMode”bool RPainterPath::getNoColorMode() constconst
getNoPattern
Section titled “getNoPattern”bool RPainterPath::getNoPattern() constconst
getOriginalShape
Section titled “getOriginalShape”QSharedPointer< RShape > RPainterPath::getOriginalShape(int i) constconst
getPen
Section titled “getPen”QPen RPainterPath::getPen() constconst
Returns: Pen of this painter path.
getPixelSizeHint
Section titled “getPixelSizeHint”double RPainterPath::getPixelSizeHint() constconst
getPixelUnit
Section titled “getPixelUnit”bool RPainterPath::getPixelUnit() constconst
getPixelWidth
Section titled “getPixelWidth”bool RPainterPath::getPixelWidth() constconst
getPoints
Section titled “getPoints”QList< RVector > RPainterPath::getPoints() constconst
getPolylineGen
Section titled “getPolylineGen”bool RPainterPath::getPolylineGen() constconst
getScreenBasedLinetype
Section titled “getScreenBasedLinetype”bool RPainterPath::getScreenBasedLinetype() constconst
getShapes
Section titled “getShapes”QList< QSharedPointer< RShape > > RPainterPath::getShapes() constconst
getSimplePointDisplay
Section titled “getSimplePointDisplay”bool RPainterPath::getSimplePointDisplay() constconst
getStartPoint
Section titled “getStartPoint”RVector RPainterPath::getStartPoint() constconst
getTypeAt
Section titled “getTypeAt”QPainterPath::ElementType RPainterPath::getTypeAt(int i) constconst
getWipeout
Section titled “getWipeout”bool RPainterPath::getWipeout() constconst
getXAt
Section titled “getXAt”double RPainterPath::getXAt(int i) constconst
getYAt
Section titled “getYAt”double RPainterPath::getYAt(int i) constconst
getZLevel
Section titled “getZLevel”int RPainterPath::getZLevel() constconst
Returns: Z-level of the painter path.
hasOriginalShapes
Section titled “hasOriginalShapes”bool RPainterPath::hasOriginalShapes() constconst
hasPoints
Section titled “hasPoints”bool RPainterPath::hasPoints() constconst
isAtPosition
Section titled “isAtPosition”bool RPainterPath::isAtPosition(const RVector &p, double tolerance=RS::PointTolerance) constconst
isEmpty
Section titled “isEmpty”bool RPainterPath::isEmpty() constconst
isFixedBrushColor
Section titled “isFixedBrushColor”bool RPainterPath::isFixedBrushColor() constconst
isFixedPenColor
Section titled “isFixedPenColor”bool RPainterPath::isFixedPenColor() constconst
isHighlighted
Section titled “isHighlighted”bool RPainterPath::isHighlighted() constconst
isSane
Section titled “isSane”bool RPainterPath::isSane() constconst
isSelected
Section titled “isSelected”bool RPainterPath::isSelected() constconst
isValid
Section titled “isValid”bool RPainterPath::isValid() constconst
lineTo
Section titled “lineTo”void RPainterPath::lineTo(const QPointF &p)inline
Non-Scriptable: This function is not available in script environments.
lineTo
Section titled “lineTo”void RPainterPath::lineTo(const RVector &v)inline
lineTo
Section titled “lineTo”void RPainterPath::lineTo(qreal x, qreal y)inline
void RPainterPath::move(const RVector &offset)moveTo
Section titled “moveTo”void RPainterPath::moveTo(const QPointF &p)inline
Non-Scriptable: This function is not available in script environments.
moveTo
Section titled “moveTo”void RPainterPath::moveTo(const RVector &v)inline
moveTo
Section titled “moveTo”void RPainterPath::moveTo(qreal x, qreal y)inline
moveToOrNop
Section titled “moveToOrNop”void RPainterPath::moveToOrNop(const RVector &v)inline
quadTo
Section titled “quadTo”void RPainterPath::quadTo(const RVector &cp, const RVector &v)inline
quadTo
Section titled “quadTo”void RPainterPath::quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty)inline
rotate
Section titled “rotate”void RPainterPath::rotate(double angle)void RPainterPath::scale(double fx, double fy)setAlwaysRegen
Section titled “setAlwaysRegen”void RPainterPath::setAlwaysRegen(bool on)setAutoRegen
Section titled “setAutoRegen”void RPainterPath::setAutoRegen(bool on)setBrush
Section titled “setBrush”void RPainterPath::setBrush(const QBrush &b)setFeatureSize
Section titled “setFeatureSize”void RPainterPath::setFeatureSize(double s)setFixedBrushColor
Section titled “setFixedBrushColor”void RPainterPath::setFixedBrushColor(bool on)setFixedPenColor
Section titled “setFixedPenColor”void RPainterPath::setFixedPenColor(bool on)setFrameless
Section titled “setFrameless”void RPainterPath::setFrameless(bool on)setHighlighted
Section titled “setHighlighted”void RPainterPath::setHighlighted(bool on)setInheritPen
Section titled “setInheritPen”void RPainterPath::setInheritPen(bool on)setMode
Section titled “setMode”void RPainterPath::setMode(RPainterPath::Mode mode, bool on=true)setNoClipping
Section titled “setNoClipping”void RPainterPath::setNoClipping(bool on)setNoColorMode
Section titled “setNoColorMode”void RPainterPath::setNoColorMode(bool on)setNoPattern
Section titled “setNoPattern”void RPainterPath::setNoPattern(bool on)setPath
Section titled “setPath”void RPainterPath::setPath(const QPainterPath &path)setPen
Section titled “setPen”void RPainterPath::setPen(const QPen &p)Sets the pen of this painter path.
The pen may be set before painting the path but this is up to the caller.
setPixelSizeHint
Section titled “setPixelSizeHint”void RPainterPath::setPixelSizeHint(double s)setPixelUnit
Section titled “setPixelUnit”void RPainterPath::setPixelUnit(bool on)setPixelWidth
Section titled “setPixelWidth”void RPainterPath::setPixelWidth(bool on)setPoints
Section titled “setPoints”void RPainterPath::setPoints(const QList< RVector > &p)setPolylineGen
Section titled “setPolylineGen”void RPainterPath::setPolylineGen(bool on)setScreenBasedLinetype
Section titled “setScreenBasedLinetype”void RPainterPath::setScreenBasedLinetype(bool on)setSelected
Section titled “setSelected”void RPainterPath::setSelected(bool on)setSimplePointDisplay
Section titled “setSimplePointDisplay”void RPainterPath::setSimplePointDisplay(bool on)setValid
Section titled “setValid”void RPainterPath::setValid(bool on)setWipeout
Section titled “setWipeout”void RPainterPath::setWipeout(bool on)setZLevel
Section titled “setZLevel”void RPainterPath::setZLevel(int zl)Sets the z-level of the painter path.
Painter paths may be ordered by z-level when drawn.
transform
Section titled “transform”void RPainterPath::transform(const QTransform &t)getMaxList
Section titled “getMaxList”static RVector RPainterPath::getMaxList(QList< RPainterPath > &pps)static
getMinList
Section titled “getMinList”static RVector RPainterPath::getMinList(QList< RPainterPath > &pps)static
rotateList
Section titled “rotateList”static void RPainterPath::rotateList(QList< RPainterPath > &pps, double angle)static
scaleList
Section titled “scaleList”static void RPainterPath::scaleList(QList< RPainterPath > &pps, double fx, double fy)static
translateList
Section titled “translateList”static void RPainterPath::translateList(QList< RPainterPath > &pps, const RVector &offset)static
QBrush RPainterPath::brushprivate
featureSize
Section titled “featureSize”double RPainterPath::featureSizeprivate
Modes RPainterPath::modesprivate
originalShapes
Section titled “originalShapes”QList<QSharedPointer<RShape> > RPainterPath::originalShapesprivate
QPen RPainterPath::penprivate
pixelSizeHint
Section titled “pixelSizeHint”double RPainterPath::pixelSizeHintprivate
points
Section titled “points”QList<RVector> RPainterPath::pointsprivate
zLevel
Section titled “zLevel”int RPainterPath::zLevelprivate