diff options
author | Colin Ogilvie <colin.ogilvie@kdab.com> | 2018-07-03 14:29:27 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-07-12 20:26:34 +0000 |
commit | eab3371b91a2a752a123c4995d977a36ff952168 (patch) | |
tree | ca15f0c6bb58634d3444bdbbe25e355e852c2cc7 /src/quick/items/context2d/qquickcontext2d_p.h | |
parent | 1c6751558668c3527233d8b2d2e252f2ea133624 (diff) |
Add LineStyle support to Context2d
Allow Context2D lines to be drawn as dashed, dotted etc.
[ChangeLog][QtQuick][Canvas] Added set/get lineDash and lineDashOffset to Context2D to allow non solid lines to be drawn.
Task-number: QTBUG-31807
Change-Id: I9ffcc5d93dc352dbd0aec4ac8a616c999239c48d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quick/items/context2d/qquickcontext2d_p.h')
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index 4cc07027b1..1ece6796f3 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -112,6 +112,8 @@ public: LineWidth, LineCap, LineJoin, + LineDash, + LineDashOffset, MiterLimit, ShadowOffsetX, ShadowOffsetY, @@ -142,6 +144,7 @@ public: , lineWidth(1) , lineCap(Qt::FlatCap) , lineJoin(Qt::MiterJoin) + , lineDashOffset(0) , miterLimit(10) , shadowOffsetX(0) , shadowOffsetY(0) @@ -170,6 +173,8 @@ public: qreal lineWidth; Qt::PenCapStyle lineCap; Qt::PenJoinStyle lineJoin; + QVector<qreal> lineDash; + qreal lineDashOffset; qreal miterLimit; qreal shadowOffsetX; qreal shadowOffsetY; |