summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r--src/gui/painting/qpainterpath.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 156e411154..b4c42f7060 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -2551,6 +2551,26 @@ QPainterPathStroker::QPainterPathStroker()
}
/*!
+ Creates a new stroker based on \a pen.
+
+ \since 5.3
+ */
+QPainterPathStroker::QPainterPathStroker(const QPen &pen)
+ : d_ptr(new QPainterPathStrokerPrivate)
+{
+ setWidth(pen.widthF());
+ setCapStyle(pen.capStyle());
+ setJoinStyle(pen.joinStyle());
+ setMiterLimit(pen.miterLimit());
+ setDashOffset(pen.dashOffset());
+
+ if (pen.style() == Qt::CustomDashLine)
+ setDashPattern(pen.dashPattern());
+ else
+ setDashPattern(pen.style());
+}
+
+/*!
Destroys the stroker.
*/
QPainterPathStroker::~QPainterPathStroker()