diff options
-rw-r--r-- | examples/quick/quick.pro | 2 | ||||
-rw-r--r-- | examples/quick/shapes/content/item1.qml (renamed from examples/quick/pathitem/content/item1.qml) | 6 | ||||
-rw-r--r-- | examples/quick/shapes/content/item10.qml (renamed from examples/quick/pathitem/content/item10.qml) | 26 | ||||
-rw-r--r-- | examples/quick/shapes/content/item11.qml (renamed from examples/quick/pathitem/content/item11.qml) | 22 | ||||
-rw-r--r-- | examples/quick/shapes/content/item12.qml (renamed from examples/quick/pathitem/content/item12.qml) | 18 | ||||
-rw-r--r-- | examples/quick/shapes/content/item13.qml (renamed from examples/quick/pathitem/content/item13.qml) | 8 | ||||
-rw-r--r-- | examples/quick/shapes/content/item14.qml (renamed from examples/quick/pathitem/content/item14.qml) | 8 | ||||
-rw-r--r-- | examples/quick/shapes/content/item15.qml (renamed from examples/quick/pathitem/content/item15.qml) | 12 | ||||
-rw-r--r-- | examples/quick/shapes/content/item17.qml (renamed from examples/quick/pathitem/content/item17.qml) | 6 | ||||
-rw-r--r-- | examples/quick/shapes/content/item2.qml (renamed from examples/quick/pathitem/content/item2.qml) | 10 | ||||
-rw-r--r-- | examples/quick/shapes/content/item4.qml (renamed from examples/quick/pathitem/content/item4.qml) | 22 | ||||
-rw-r--r-- | examples/quick/shapes/content/item5.qml (renamed from examples/quick/pathitem/content/item5.qml) | 20 | ||||
-rw-r--r-- | examples/quick/shapes/content/item6.qml (renamed from examples/quick/pathitem/content/item6.qml) | 10 | ||||
-rw-r--r-- | examples/quick/shapes/content/item7.qml (renamed from examples/quick/pathitem/content/item7.qml) | 10 | ||||
-rw-r--r-- | examples/quick/shapes/content/item8.qml (renamed from examples/quick/pathitem/content/item8.qml) | 8 | ||||
-rw-r--r-- | examples/quick/shapes/content/item9.qml (renamed from examples/quick/pathitem/content/item9.qml) | 12 | ||||
-rw-r--r-- | examples/quick/shapes/content/pathitem.qml (renamed from examples/quick/pathitem/content/pathitem.qml) | 4 | ||||
-rw-r--r-- | examples/quick/shapes/content/pathitemgallery.qml (renamed from examples/quick/pathitem/content/pathitemgallery.qml) | 38 | ||||
-rw-r--r-- | examples/quick/shapes/content/pathiteminteract.qml (renamed from examples/quick/pathitem/content/pathiteminteract.qml) | 20 | ||||
-rw-r--r-- | examples/quick/shapes/content/pathitemsampling.qml (renamed from examples/quick/pathitem/content/pathitemsampling.qml) | 22 | ||||
-rw-r--r-- | examples/quick/shapes/content/pathitemtigers.qml (renamed from examples/quick/pathitem/content/pathitemtigers.qml) | 6 | ||||
-rw-r--r-- | examples/quick/shapes/content/tiger.qml (renamed from examples/quick/pathitem/content/tiger.qml) | 486 | ||||
-rw-r--r-- | examples/quick/shapes/main.cpp (renamed from examples/quick/pathitem/main.cpp) | 0 | ||||
-rw-r--r-- | examples/quick/shapes/shapes.pro (renamed from examples/quick/pathitem/pathitem.pro) | 4 | ||||
-rw-r--r-- | examples/quick/shapes/shapes.qrc (renamed from examples/quick/pathitem/pathitem.qrc) | 0 | ||||
-rw-r--r-- | src/imports/imports.pro | 2 | ||||
-rw-r--r-- | src/imports/pathitem/pathitem.pro | 31 | ||||
-rw-r--r-- | src/imports/pathitem/qmldir | 4 | ||||
-rw-r--r-- | src/imports/pathitem/qquickpathitem.cpp | 2258 | ||||
-rw-r--r-- | src/imports/shapes/plugin.cpp (renamed from src/imports/pathitem/plugin.cpp) | 20 | ||||
-rw-r--r-- | src/imports/shapes/plugins.qmltypes (renamed from src/imports/pathitem/plugins.qmltypes) | 48 | ||||
-rw-r--r-- | src/imports/shapes/qmldir | 4 | ||||
-rw-r--r-- | src/imports/shapes/qquicknvprfunctions.cpp (renamed from src/imports/pathitem/qquicknvprfunctions.cpp) | 7 | ||||
-rw-r--r-- | src/imports/shapes/qquicknvprfunctions_p.h (renamed from src/imports/pathitem/qquicknvprfunctions_p.h) | 22 | ||||
-rw-r--r-- | src/imports/shapes/qquicknvprfunctions_p_p.h (renamed from src/imports/pathitem/qquicknvprfunctions_p_p.h) | 0 | ||||
-rw-r--r-- | src/imports/shapes/qquickshape.cpp | 1485 | ||||
-rw-r--r-- | src/imports/shapes/qquickshape_p.h (renamed from src/imports/pathitem/qquickpathitem_p.h) | 62 | ||||
-rw-r--r-- | src/imports/shapes/qquickshape_p_p.h (renamed from src/imports/pathitem/qquickpathitem_p_p.h) | 94 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapegenericrenderer.cpp (renamed from src/imports/pathitem/qquickpathitemgenericrenderer.cpp) | 186 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapegenericrenderer_p.h (renamed from src/imports/pathitem/qquickpathitemgenericrenderer_p.h) | 112 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapenvprrenderer.cpp (renamed from src/imports/pathitem/qquickpathitemnvprrenderer.cpp) | 146 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapenvprrenderer_p.h (renamed from src/imports/pathitem/qquickpathitemnvprrenderer_p.h) | 68 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapesoftwarerenderer.cpp (renamed from src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp) | 92 | ||||
-rw-r--r-- | src/imports/shapes/qquickshapesoftwarerenderer_p.h (renamed from src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h) | 46 | ||||
-rw-r--r-- | src/imports/shapes/shapes.pro | 31 | ||||
-rw-r--r-- | src/quick/util/qquickpath.cpp | 16 | ||||
-rw-r--r-- | tests/auto/quick/examples/tst_examples.cpp | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquickpathitem/qquickpathitem.pro | 35 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem1.qml (renamed from tests/auto/quick/qquickpathitem/data/pathitem1.qml) | 2 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem2.qml (renamed from tests/auto/quick/qquickpathitem/data/pathitem2.qml) | 6 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem3.png (renamed from tests/auto/quick/qquickpathitem/data/pathitem3.png) | bin | 5214 -> 5214 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem3.qml (renamed from tests/auto/quick/qquickpathitem/data/pathitem3.qml) | 18 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.png (renamed from tests/auto/quick/qquickpathitem/data/pathitem4.png) | bin | 5713 -> 5713 bytes | |||
-rw-r--r-- | tests/auto/quick/qquickshape/data/pathitem4.qml (renamed from tests/auto/quick/qquickpathitem/data/pathitem4.qml) | 14 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/qquickshape.pro | 35 | ||||
-rw-r--r-- | tests/auto/quick/qquickshape/tst_qquickshape.cpp (renamed from tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp) | 88 | ||||
-rw-r--r-- | tests/auto/quick/quick.pro | 2 | ||||
-rw-r--r-- | tests/manual/pathitem/pathitem.pro | 6 | ||||
-rw-r--r-- | tests/manual/pathitem/pathitem.qrc | 5 | ||||
-rw-r--r-- | tests/manual/pathitem/pathitemtest.qml | 4045 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml | 2 | ||||
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml | 2 | ||||
-rw-r--r-- | tests/manual/shapestest/main.cpp (renamed from tests/manual/pathitem/main.cpp) | 2 | ||||
-rw-r--r-- | tests/manual/shapestest/shapestest.pro | 6 | ||||
-rw-r--r-- | tests/manual/shapestest/shapestest.qml | 418 | ||||
-rw-r--r-- | tests/manual/shapestest/shapestest.qrc | 5 |
71 files changed, 2890 insertions, 7329 deletions
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro index bb5af35dc6..22dfff703e 100644 --- a/examples/quick/quick.pro +++ b/examples/quick/quick.pro @@ -24,7 +24,7 @@ SUBDIRS = quick-accessibility \ imageresponseprovider \ window \ particles \ - pathitem \ + shapes \ demos #OpenGL Support Required diff --git a/examples/quick/pathitem/content/item1.qml b/examples/quick/shapes/content/item1.qml index e870c50a89..8319c44ba4 100644 --- a/examples/quick/pathitem/content/item1.qml +++ b/examples/quick/shapes/content/item1.qml @@ -49,16 +49,16 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { id: ctr anchors.fill: parent - VisualPath { + ShapePath { strokeColor: "red" fillColor: "blue" diff --git a/examples/quick/pathitem/content/item10.qml b/examples/quick/shapes/content/item10.qml index 599d41506f..e7c183ab1f 100644 --- a/examples/quick/pathitem/content/item10.qml +++ b/examples/quick/shapes/content/item10.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" @@ -59,11 +59,11 @@ Rectangle { height: 200 anchors.centerIn: parent - PathItem { - id: pathItem + Shape { + id: shape anchors.fill: parent - VisualPath { + ShapePath { strokeWidth: 4 strokeColor: "black" fillColor: "lightBlue" @@ -90,13 +90,13 @@ Rectangle { target: cp1 property: "x" from: 0 - to: pathItem.width - cp1.width + to: shape.width - cp1.width duration: 5000 } NumberAnimation { target: cp1 property: "x" - from: pathItem.width - cp1.width + from: shape.width - cp1.width to: 0 duration: 5000 } @@ -104,13 +104,13 @@ Rectangle { target: cp1 property: "y" from: 0 - to: pathItem.height - cp1.height + to: shape.height - cp1.height duration: 5000 } NumberAnimation { target: cp1 property: "y" - from: pathItem.height - cp1.height + from: shape.height - cp1.height to: 0 duration: 5000 } @@ -121,7 +121,7 @@ Rectangle { id: cp2 color: "blue" width: 10; height: 10 - x: pathItem.width - width + x: shape.width - width SequentialAnimation { loops: Animation.Infinite running: true @@ -129,20 +129,20 @@ Rectangle { target: cp2 property: "y" from: 0 - to: pathItem.height - cp2.height + to: shape.height - cp2.height duration: 5000 } NumberAnimation { target: cp2 property: "y" - from: pathItem.height - cp2.height + from: shape.height - cp2.height to: 0 duration: 5000 } NumberAnimation { target: cp2 property: "x" - from: pathItem.width - cp2.width + from: shape.width - cp2.width to: 0 duration: 5000 } @@ -150,7 +150,7 @@ Rectangle { target: cp2 property: "x" from: 0 - to: pathItem.width - cp2.width + to: shape.width - cp2.width duration: 5000 } } diff --git a/examples/quick/pathitem/content/item11.qml b/examples/quick/shapes/content/item11.qml index 4f26663e5f..2632e116c4 100644 --- a/examples/quick/pathitem/content/item11.qml +++ b/examples/quick/shapes/content/item11.qml @@ -49,21 +49,21 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { - id: pathItem + Shape { + id: shape width: 220 height: 200 anchors.centerIn: parent - VisualPath { - fillGradient: PathLinearGradient { - y2: pathItem.height - PathGradientStop { position: 0; color: "yellow" } - PathGradientStop { position: 1; color: "green" } + ShapePath { + fillGradient: ShapeLinearGradient { + y2: shape.height + ShapeGradientStop { position: 0; color: "yellow" } + ShapeGradientStop { position: 1; color: "green" } } Path { @@ -88,7 +88,7 @@ Rectangle { } } - PathItem { + Shape { width: 120 height: 130 anchors.bottom: parent.bottom @@ -96,11 +96,11 @@ Rectangle { scale: 0.5 - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "darkBlue" strokeWidth: 20 - capStyle: VisualPath.RoundCap + capStyle: ShapePath.RoundCap Path { startX: 20; startY: 50 diff --git a/examples/quick/pathitem/content/item12.qml b/examples/quick/shapes/content/item12.qml index cf7e13dcca..c7220aea8c 100644 --- a/examples/quick/pathitem/content/item12.qml +++ b/examples/quick/shapes/content/item12.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" @@ -59,17 +59,17 @@ Rectangle { height: 200 anchors.centerIn: parent - PathItem { + Shape { anchors.fill: parent - VisualPath { + ShapePath { strokeColor: "transparent" - fillGradient: PathLinearGradient { + fillGradient: ShapeLinearGradient { id: grad y1: 50; y2: 150 - PathGradientStop { position: 0; color: "black" } - PathGradientStop { position: 1; color: "red" } + ShapeGradientStop { position: 0; color: "black" } + ShapeGradientStop { position: 1; color: "red" } } Path { @@ -87,16 +87,16 @@ Rectangle { interval: 3000 running: true repeat: true - property variant spreads: [ PathGradient.PadSpread, PathGradient.RepeatSpread, PathGradient.ReflectSpread ] + property variant spreads: [ ShapeGradient.PadSpread, ShapeGradient.RepeatSpread, ShapeGradient.ReflectSpread ] property variant spreadTexts: [ "PadSpread", "RepeatSpread", "ReflectSpread" ] property int spreadIdx: 0 onTriggered: { spreadIdx = (spreadIdx + 1) % spreads.length; grad.spread = spreads[spreadIdx] } } - PathItem { + Shape { anchors.fill: parent - VisualPath { + ShapePath { strokeColor: "gray" strokeWidth: 2 fillColor: "transparent" diff --git a/examples/quick/pathitem/content/item13.qml b/examples/quick/shapes/content/item13.qml index 02dc6a719e..8a69454b7c 100644 --- a/examples/quick/pathitem/content/item13.qml +++ b/examples/quick/shapes/content/item13.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" @@ -62,13 +62,13 @@ Rectangle { Repeater { model: 2 - PathItem { + Shape { anchors.fill: parent - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: model.index === 0 ? "red" : "blue" - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine strokeWidth: 4 Path { diff --git a/examples/quick/pathitem/content/item14.qml b/examples/quick/shapes/content/item14.qml index 320ba7cb47..18be4ba671 100644 --- a/examples/quick/pathitem/content/item14.qml +++ b/examples/quick/shapes/content/item14.qml @@ -49,22 +49,22 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" Repeater { model: 2 - PathItem { + Shape { width: 200 height: 200 anchors.centerIn: parent - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: model.index === 0 ? "red" : "blue" - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine strokeWidth: 4 Path { diff --git a/examples/quick/pathitem/content/item15.qml b/examples/quick/shapes/content/item15.qml index 470e2f88f3..c881f3513f 100644 --- a/examples/quick/pathitem/content/item15.qml +++ b/examples/quick/shapes/content/item15.qml @@ -49,22 +49,22 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" Repeater { model: 2 - PathItem { + Shape { width: 200 height: 200 anchors.centerIn: parent - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: model.index === 0 ? "red" : "blue" - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine strokeWidth: 4 Path { @@ -81,12 +81,12 @@ Rectangle { Repeater { model: 2 - PathItem { + Shape { width: 200 height: 200 anchors.centerIn: parent - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: model.index === 0 ? "red" : "blue" diff --git a/examples/quick/pathitem/content/item17.qml b/examples/quick/shapes/content/item17.qml index f16608a7d9..6ee03ddd04 100644 --- a/examples/quick/pathitem/content/item17.qml +++ b/examples/quick/shapes/content/item17.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" @@ -62,11 +62,11 @@ Rectangle { text: "Loading" // Phase #1: Loader loads tiger.qml. After this we have our item. // Phase #2: With some backends (generic) the item will start async processing. Wait for this too. - visible: pathItemLoader.status != Loader.Ready || pathItemLoader.item.status === PathItem.Processing + visible: shapeLoader.status != Loader.Ready || shapeLoader.item.status === Shape.Processing } Loader { - id: pathItemLoader + id: shapeLoader anchors.fill: parent source: "tiger.qml" asynchronous: true diff --git a/examples/quick/pathitem/content/item2.qml b/examples/quick/shapes/content/item2.qml index dc65f51cf3..ca0026a1df 100644 --- a/examples/quick/pathitem/content/item2.qml +++ b/examples/quick/shapes/content/item2.qml @@ -49,16 +49,16 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { id: circ1 anchors.fill: parent - VisualPath { + ShapePath { fillColor: "transparent" // stroke only strokeWidth: 4 @@ -102,7 +102,7 @@ Rectangle { } } - PathItem { + Shape { id: circ2 anchors.fill: parent @@ -112,7 +112,7 @@ Rectangle { NumberAnimation { from: 0.0; to: 1.0; duration: 5000 } } - VisualPath { + ShapePath { strokeWidth: -1 // or strokeColor: "transparent" SequentialAnimation on fillColor { diff --git a/examples/quick/pathitem/content/item4.qml b/examples/quick/shapes/content/item4.qml index 4a3ccf049b..5f0704a48d 100644 --- a/examples/quick/pathitem/content/item4.qml +++ b/examples/quick/shapes/content/item4.qml @@ -49,18 +49,18 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { - id: pathItem + Shape { + id: shape anchors.fill: parent - VisualPath { + ShapePath { strokeWidth: 5 strokeColor: "blue" - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine dashPattern: [ 1, 4, 4, 4 ] fillColor: "lightBlue" @@ -68,17 +68,17 @@ Rectangle { id: p property real xr: 70 property real yr: 30 - startX: pathItem.width / 2 - xr - startY: pathItem.height / 2 - yr + startX: shape.width / 2 - xr + startY: shape.height / 2 - yr PathArc { - x: pathItem.width / 2 + p.xr - y: pathItem.height / 2 + p.yr + x: shape.width / 2 + p.xr + y: shape.height / 2 + p.yr radiusX: p.xr; radiusY: p.yr useLargeArc: true } PathArc { - x: pathItem.width / 2 - p.xr - y: pathItem.height / 2 - p.yr + x: shape.width / 2 - p.xr + y: shape.height / 2 - p.yr radiusX: p.xr; radiusY: p.yr useLargeArc: true } diff --git a/examples/quick/pathitem/content/item5.qml b/examples/quick/shapes/content/item5.qml index 6a876fa1f7..44c301c4ec 100644 --- a/examples/quick/pathitem/content/item5.qml +++ b/examples/quick/shapes/content/item5.qml @@ -49,28 +49,28 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { width: 200 height: 150 anchors.centerIn: parent - VisualPath { + ShapePath { strokeWidth: 4 strokeColor: "red" - fillGradient: PathLinearGradient { + fillGradient: ShapeLinearGradient { x1: 20; y1: 20 x2: 180; y2: 130 - PathGradientStop { position: 0; color: "blue" } - PathGradientStop { position: 0.2; color: "green" } - PathGradientStop { position: 0.4; color: "red" } - PathGradientStop { position: 0.6; color: "yellow" } - PathGradientStop { position: 1; color: "cyan" } + ShapeGradientStop { position: 0; color: "blue" } + ShapeGradientStop { position: 0.2; color: "green" } + ShapeGradientStop { position: 0.4; color: "red" } + ShapeGradientStop { position: 0.6; color: "yellow" } + ShapeGradientStop { position: 1; color: "cyan" } } fillColor: "blue" // ignored with the gradient set - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine dashPattern: [ 1, 4 ] Path { startX: 20; startY: 20 diff --git a/examples/quick/pathitem/content/item6.qml b/examples/quick/shapes/content/item6.qml index 10deafdcd7..334bc87fe0 100644 --- a/examples/quick/pathitem/content/item6.qml +++ b/examples/quick/shapes/content/item6.qml @@ -49,15 +49,15 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { width: 100 height: 100 anchors.centerIn: parent - VisualPath { + ShapePath { id: star strokeColor: "blue" fillColor: "magenta" @@ -80,12 +80,12 @@ Rectangle { } Timer { interval: 2000 - onTriggered: star.fillRule = (star.fillRule === VisualPath.OddEvenFill ? VisualPath.WindingFill : VisualPath.OddEvenFill) + onTriggered: star.fillRule = (star.fillRule === ShapePath.OddEvenFill ? ShapePath.WindingFill : ShapePath.OddEvenFill) repeat: true running: true } Text { anchors.right: parent.right - text: star.fillRule === VisualPath.OddEvenFill ? "OddEvenFill" : "WindingFill" + text: star.fillRule === ShapePath.OddEvenFill ? "OddEvenFill" : "WindingFill" } } diff --git a/examples/quick/pathitem/content/item7.qml b/examples/quick/shapes/content/item7.qml index 2840cd7c5a..c5efdc4f90 100644 --- a/examples/quick/pathitem/content/item7.qml +++ b/examples/quick/shapes/content/item7.qml @@ -49,26 +49,26 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { width: 120 height: 120 anchors.centerIn: parent - VisualPath { + ShapePath { id: joinTest strokeColor: "black" strokeWidth: 16 fillColor: "transparent" - capStyle: VisualPath.RoundCap + capStyle: ShapePath.RoundCap property int joinStyleIdx: 0 - property variant styles: [ VisualPath.BevelJoin, VisualPath.MiterJoin, VisualPath.RoundJoin ] + property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ] property variant styleTexts: [ "BevelJoin", "MiterJoin", "RoundJoin" ] joinStyle: styles[joinStyleIdx] diff --git a/examples/quick/pathitem/content/item8.qml b/examples/quick/shapes/content/item8.qml index 97304baa91..7e2a8bccfe 100644 --- a/examples/quick/pathitem/content/item8.qml +++ b/examples/quick/shapes/content/item8.qml @@ -49,24 +49,24 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" - PathItem { + Shape { anchors.centerIn: parent width: 200 height: 100 - VisualPath { + ShapePath { id: capTest strokeColor: "green" strokeWidth: 20 fillColor: "transparent" property int capStyleIdx: 0 - property variant styles: [ VisualPath.FlatCap, VisualPath.SquareCap, VisualPath.RoundCap ] + property variant styles: [ ShapePath.FlatCap, ShapePath.SquareCap, ShapePath.RoundCap ] property variant styleTexts: [ "FlatCap", "SquareCap", "RoundCap" ] capStyle: styles[capStyleIdx] diff --git a/examples/quick/pathitem/content/item9.qml b/examples/quick/shapes/content/item9.qml index a57b4484a8..dac352422a 100644 --- a/examples/quick/pathitem/content/item9.qml +++ b/examples/quick/shapes/content/item9.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { color: "lightGray" @@ -59,11 +59,11 @@ Rectangle { height: 100 anchors.centerIn: parent - PathItem { - id: pathItem + Shape { + id: shape anchors.fill: parent - VisualPath { + ShapePath { strokeWidth: 4 strokeColor: "black" fillColor: "transparent" @@ -88,11 +88,11 @@ Rectangle { loops: Animation.Infinite NumberAnimation { from: 0 - to: pathItem.width - cp.width + to: shape.width - cp.width duration: 5000 } NumberAnimation { - from: pathItem.width - cp.width + from: shape.width - cp.width to: 0 duration: 5000 } diff --git a/examples/quick/pathitem/content/pathitem.qml b/examples/quick/shapes/content/pathitem.qml index e1fae2bbe2..0933aa79b2 100644 --- a/examples/quick/pathitem/content/pathitem.qml +++ b/examples/quick/shapes/content/pathitem.qml @@ -56,8 +56,8 @@ Item { LauncherList { anchors.fill: parent Component.onCompleted: { - addExample("PathItem Gallery", "Simple path rendering examples", Qt.resolvedUrl("pathitemgallery.qml")) - addExample("Interactive PathItem", "Dynamic, interactive path rendering examples", Qt.resolvedUrl("pathiteminteract.qml")) + addExample("Shape Gallery", "Simple path rendering examples", Qt.resolvedUrl("pathitemgallery.qml")) + addExample("Interactive Shape", "Dynamic, interactive path rendering examples", Qt.resolvedUrl("pathiteminteract.qml")) addExample("Super- and multisampling", "Improving quality", Qt.resolvedUrl("pathitemsampling.qml")) addExample("Clip My Tiger!", "Clip examples, a.k.a. What Not To Do", Qt.resolvedUrl("pathitemtigers.qml")) } diff --git a/examples/quick/pathitem/content/pathitemgallery.qml b/examples/quick/shapes/content/pathitemgallery.qml index b4ec787e91..3b418639ee 100644 --- a/examples/quick/pathitem/content/pathitemgallery.qml +++ b/examples/quick/shapes/content/pathitemgallery.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { id: root @@ -68,63 +68,63 @@ Rectangle { id: pathGalleryModel ListElement { name: "Stroke and fill" - pathItemUrl: "item1.qml" + shapeUrl: "item1.qml" } ListElement { name: "Stroke or fill only" - pathItemUrl: "item2.qml" + shapeUrl: "item2.qml" } ListElement { name: "Dash pattern" - pathItemUrl: "item4.qml" + shapeUrl: "item4.qml" } ListElement { name: "Linear gradient" - pathItemUrl: "item5.qml" + shapeUrl: "item5.qml" } ListElement { name: "Fill rules" - pathItemUrl: "item6.qml" + shapeUrl: "item6.qml" } ListElement { name: "Join styles" - pathItemUrl: "item7.qml" + shapeUrl: "item7.qml" } ListElement { name: "Cap styles" - pathItemUrl: "item8.qml" + shapeUrl: "item8.qml" } ListElement { name: "Quadratic curve" - pathItemUrl: "item9.qml" + shapeUrl: "item9.qml" } ListElement { name: "Cubic curve" - pathItemUrl: "item10.qml" + shapeUrl: "item10.qml" } ListElement { name: "Elliptical arc" - pathItemUrl: "item11.qml" + shapeUrl: "item11.qml" } ListElement { name: "Gradient spread modes" - pathItemUrl: "item12.qml" + shapeUrl: "item12.qml" } ListElement { name: "Arc direction" - pathItemUrl: "item13.qml" + shapeUrl: "item13.qml" } ListElement { name: "Large/small arc" - pathItemUrl: "item14.qml" + shapeUrl: "item14.qml" } ListElement { name: "Arc rotation" - pathItemUrl: "item15.qml" + shapeUrl: "item15.qml" } ListElement { name: "Tiger" - pathItemUrl: "item17.qml" + shapeUrl: "item17.qml" } } @@ -143,7 +143,7 @@ Rectangle { width: parent.width height: parent.height - delegText.height Loader { - source: Qt.resolvedUrl(pathItemUrl) + source: Qt.resolvedUrl(shapeUrl) anchors.fill: parent } } @@ -176,11 +176,11 @@ Rectangle { Text { anchors.right: parent.right - PathItem { id: dummyPathItem; VisualPath { } } // used only to get the renderer type + Shape { id: dummyShape; ShapePath { } } // used only to get the renderer type color: "darkBlue" font.pointSize: 12 property variant rendererStrings: [ "Unknown", "Generic (QtGui triangulator)", "GL_NV_path_rendering", "Software (QPainter)" ] - text: "Active PathItem backend: " + rendererStrings[dummyPathItem.renderer] + text: "Active Shape backend: " + rendererStrings[dummyShape.renderer] SequentialAnimation on opacity { NumberAnimation { from: 1; to: 0; duration: 5000 } PauseAnimation { duration: 5000 } diff --git a/examples/quick/pathitem/content/pathiteminteract.qml b/examples/quick/shapes/content/pathiteminteract.qml index f0d2a95702..2e968eb56d 100644 --- a/examples/quick/pathitem/content/pathiteminteract.qml +++ b/examples/quick/shapes/content/pathiteminteract.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { id: root @@ -171,7 +171,7 @@ Rectangle { property variant funcs function genResizer(obj, x, y, xprop, yprop, color) { - var ma = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; Rectangle { id: rr; property variant obj; color: "' + color + '"; width: 20; height: 20;'+ + var ma = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; Rectangle { id: rr; property variant obj; color: "' + color + '"; width: 20; height: 20;'+ 'MouseArea { anchors.fill: parent; hoverEnabled: true;' + 'onEntered: color = "yellow"; onExited: color = "' + color + '";' + 'property bool a: false; onPressed: a = true; onReleased: a = false; ' + @@ -189,13 +189,13 @@ Rectangle { Component.onCompleted: { funcs = [ { "start": function(x, y) { - var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' + + var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' + 'strokeColor: "black"; fillColor: "transparent";'+ 'strokeWidth: ' + widthSlider.value + ';' + 'Path { startX: ' + x + '; startY: ' + y + ';' + 'PathLine { x: ' + x + ' + 1; y: ' + y + ' + 1 } } }', root, "dynamic_visual_path"); - pathItem.elements.push(p); + shape.elements.push(p); activePath = p; }, "move": function(x, y) { if (!activePath) @@ -211,14 +211,14 @@ Rectangle { } }, { "start": function(x, y) { - var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' + + var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' + 'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+ 'strokeWidth: ' + widthSlider.value + ';' + 'Path { startX: ' + x + '; startY: ' + y + ';' + 'PathCubic { x: ' + x + ' + 1; y: ' + y + ' + 1;' + 'control1X: ' + x + ' + 50; control1Y: ' + y + ' + 50; control2X: ' + x + ' + 150; control2Y: ' + y + ' + 50; } } }', root, "dynamic_visual_path"); - pathItem.elements.push(p); + shape.elements.push(p); activePath = p; }, "move": function(x, y) { if (!activePath) @@ -236,14 +236,14 @@ Rectangle { } }, { "start": function(x, y) { - var p = Qt.createQmlObject('import QtQuick 2.9; import Qt.labs.pathitem 1.0; VisualPath {' + + var p = Qt.createQmlObject('import QtQuick 2.9; import QtQuick.Shapes 1.0; ShapePath {' + 'strokeColor: "black"; fillColor: "' + (root.fill ? 'green' : 'transparent') + '";'+ 'strokeWidth: ' + widthSlider.value + ';' + 'Path { startX: ' + x + '; startY: ' + y + ';' + 'PathQuad { x: ' + x + ' + 1; y: ' + y + ' + 1;' + 'controlX: ' + x + ' + 50; controlY: ' + y + ' + 50 } } }', root, "dynamic_visual_path"); - pathItem.elements.push(p); + shape.elements.push(p); activePath = p; }, "move": function(x, y) { if (!activePath) @@ -275,8 +275,8 @@ Rectangle { } } - PathItem { - id: pathItem + Shape { + id: shape anchors.fill: parent elements: [] diff --git a/examples/quick/pathitem/content/pathitemsampling.qml b/examples/quick/shapes/content/pathitemsampling.qml index cb67897139..8928212aed 100644 --- a/examples/quick/pathitem/content/pathitemsampling.qml +++ b/examples/quick/shapes/content/pathitemsampling.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { id: root @@ -76,24 +76,24 @@ Rectangle { text: "Original" } - // A simple PathItem without anything special. + // A simple Shape without anything special. Rectangle { color: "lightGray" width: 400 height: 200 - PathItem { + Shape { x: 30 y: 20 width: 50 height: 50 scale: 2 - VisualPath { + ShapePath { strokeColor: "green" NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 } fillColor: "transparent" - capStyle: VisualPath.RoundCap + capStyle: ShapePath.RoundCap Path { startX: 40; startY: 30 @@ -123,18 +123,18 @@ Rectangle { layer.smooth: true layer.textureSize: Qt.size(supersampledItem.width * 2, supersampledItem.height * 2) - PathItem { + Shape { x: 30 y: 20 width: 50 height: 50 scale: 2 - VisualPath { + ShapePath { strokeColor: "green" NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 } fillColor: "transparent" - capStyle: VisualPath.RoundCap + capStyle: ShapePath.RoundCap Path { startX: 40; startY: 30 @@ -165,18 +165,18 @@ Rectangle { layer.smooth: true layer.samples: 4 - PathItem { + Shape { x: 30 y: 20 width: 50 height: 50 scale: 2 - VisualPath { + ShapePath { strokeColor: "green" NumberAnimation on strokeWidth { from: 1; to: 20; duration: 5000 } fillColor: "transparent" - capStyle: VisualPath.RoundCap + capStyle: ShapePath.RoundCap Path { startX: 40; startY: 30 diff --git a/examples/quick/pathitem/content/pathitemtigers.qml b/examples/quick/shapes/content/pathitemtigers.qml index 3ae31ba5bd..c55efdc403 100644 --- a/examples/quick/pathitem/content/pathitemtigers.qml +++ b/examples/quick/shapes/content/pathitemtigers.qml @@ -49,7 +49,7 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Rectangle { id: root @@ -86,7 +86,7 @@ Rectangle { SequentialAnimation on dy { loops: Animation.Infinite - running: loader1.status === Loader.Ready && loader1.item.status === PathItem.Ready + running: loader1.status === Loader.Ready && loader1.item.status === Shape.Ready NumberAnimation { from: 0 to: -scissorRect.centerY @@ -107,7 +107,7 @@ Rectangle { // With a more complex transformation (like rotation), stenciling is used // instead of scissoring, this is more expensive. It may also trigger a - // slower code path for PathItems, depending on the path rendering backend + // slower code path for Shapes, depending on the path rendering backend // in use, and may affect rendering quality as well. Rectangle { id: stencilRect diff --git a/examples/quick/pathitem/content/tiger.qml b/examples/quick/shapes/content/tiger.qml index b792195eec..5771797f4c 100644 --- a/examples/quick/pathitem/content/tiger.qml +++ b/examples/quick/shapes/content/tiger.qml @@ -49,16 +49,16 @@ ****************************************************************************/ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 -PathItem { - id: pathItem +Shape { + id: shape asynchronous: true anchors.fill: parent - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -70,7 +70,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -82,7 +82,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -94,7 +94,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -106,7 +106,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -118,7 +118,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -130,7 +130,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -142,7 +142,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -154,7 +154,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -166,7 +166,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -178,7 +178,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -190,7 +190,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.172 @@ -202,7 +202,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 1 @@ -298,7 +298,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeColor: "#000000" strokeWidth: 1 @@ -349,7 +349,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -374,7 +374,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#e87f3a" strokeWidth: -1 Path { @@ -399,7 +399,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ea8c4d" strokeWidth: -1 Path { @@ -424,7 +424,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ec9961" strokeWidth: -1 Path { @@ -449,7 +449,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#eea575" strokeWidth: -1 Path { @@ -474,7 +474,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f1b288" strokeWidth: -1 Path { @@ -499,7 +499,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f3bf9c" strokeWidth: -1 Path { @@ -524,7 +524,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f5ccb0" strokeWidth: -1 Path { @@ -549,7 +549,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f8d8c4" strokeWidth: -1 Path { @@ -574,7 +574,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#fae5d7" strokeWidth: -1 Path { @@ -599,7 +599,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#fcf2eb" strokeWidth: -1 Path { @@ -624,7 +624,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -649,7 +649,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -662,7 +662,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -676,7 +676,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -697,7 +697,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -708,7 +708,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -719,7 +719,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -730,7 +730,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -741,7 +741,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -752,7 +752,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -783,7 +783,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -804,7 +804,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#e5668c" strokeWidth: -1 Path { @@ -818,7 +818,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#b23259" strokeWidth: -1 Path { @@ -831,7 +831,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#a5264c" strokeWidth: -1 Path { @@ -850,7 +850,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ff727f" strokeColor: "#000000" strokeWidth: 1 @@ -869,7 +869,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -883,7 +883,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc3f4c" strokeWidth: -1 Path { @@ -898,7 +898,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#a51926" strokeWidth: 2 @@ -909,7 +909,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -921,7 +921,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -933,7 +933,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -945,7 +945,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -957,7 +957,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -969,7 +969,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -981,7 +981,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#a5264c" strokeWidth: 2 @@ -993,7 +993,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#a5264c" strokeWidth: 2 @@ -1005,7 +1005,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1019,7 +1019,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#a5264c" strokeWidth: 2 @@ -1029,7 +1029,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#a5264c" strokeWidth: 2 @@ -1039,7 +1039,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#b2b2b2" strokeWidth: -1 Path { @@ -1051,7 +1051,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1065,7 +1065,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1079,7 +1079,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1092,7 +1092,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1108,7 +1108,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1121,7 +1121,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1133,7 +1133,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1145,7 +1145,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1157,7 +1157,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffcc" strokeColor: "#000000" strokeWidth: 0.5 @@ -1169,7 +1169,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#e5e5b2" strokeWidth: -1 Path { @@ -1182,7 +1182,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#e5e5b2" strokeWidth: -1 Path { @@ -1195,7 +1195,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1211,7 +1211,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ea8e51" strokeWidth: -1 Path { @@ -1227,7 +1227,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#efaa7c" strokeWidth: -1 Path { @@ -1243,7 +1243,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f4c6a8" strokeWidth: -1 Path { @@ -1259,7 +1259,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f9e2d3" strokeWidth: -1 Path { @@ -1275,7 +1275,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -1291,7 +1291,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1303,7 +1303,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1320,7 +1320,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#99cc32" strokeWidth: -1 Path { @@ -1332,7 +1332,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#659900" strokeWidth: -1 Path { @@ -1344,7 +1344,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -1354,7 +1354,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1366,7 +1366,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1387,7 +1387,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -1408,7 +1408,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#eb955c" strokeWidth: -1 Path { @@ -1429,7 +1429,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f2b892" strokeWidth: -1 Path { @@ -1450,7 +1450,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#f8dcc8" strokeWidth: -1 Path { @@ -1471,7 +1471,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -1492,7 +1492,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1503,7 +1503,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1514,7 +1514,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#99cc32" strokeWidth: -1 Path { @@ -1525,7 +1525,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1575,7 +1575,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1594,7 +1594,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1608,7 +1608,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#323232" strokeWidth: -1 Path { @@ -1622,7 +1622,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#666666" strokeWidth: -1 Path { @@ -1636,7 +1636,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#999999" strokeWidth: -1 Path { @@ -1650,7 +1650,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1664,7 +1664,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -1678,7 +1678,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#992600" strokeWidth: -1 Path { @@ -1709,7 +1709,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1720,7 +1720,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1733,7 +1733,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1744,7 +1744,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1756,7 +1756,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -1767,7 +1767,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1836,7 +1836,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -1876,7 +1876,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1895,7 +1895,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1939,7 +1939,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1968,7 +1968,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -1999,7 +1999,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -2015,7 +2015,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cc7226" strokeWidth: -1 Path { @@ -2027,7 +2027,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2114,7 +2114,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#4c0000" strokeWidth: 2 @@ -2125,7 +2125,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#4c0000" strokeWidth: 2 @@ -2136,7 +2136,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#4c0000" strokeWidth: 2 @@ -2148,7 +2148,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#4c0000" strokeWidth: 2 @@ -2160,7 +2160,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2335,7 +2335,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#4c0000" strokeWidth: -1 Path { @@ -2348,7 +2348,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#99cc32" strokeWidth: -1 Path { @@ -2360,7 +2360,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#659900" strokeWidth: -1 Path { @@ -2372,7 +2372,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2384,7 +2384,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2392,7 +2392,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2415,7 +2415,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#e59999" strokeWidth: -1 Path { @@ -2435,7 +2435,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#b26565" strokeWidth: -1 Path { @@ -2455,7 +2455,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#992600" strokeWidth: -1 Path { @@ -2482,7 +2482,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -2495,7 +2495,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#992600" strokeWidth: -1 Path { @@ -2514,7 +2514,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2548,7 +2548,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2573,7 +2573,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2600,7 +2600,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2679,7 +2679,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2716,7 +2716,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2728,7 +2728,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2741,7 +2741,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2758,7 +2758,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2772,7 +2772,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -2802,7 +2802,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeWidth: -1 Path { @@ -2819,7 +2819,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -2840,7 +2840,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2857,7 +2857,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -2874,7 +2874,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2891,7 +2891,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2902,7 +2902,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2913,7 +2913,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2924,7 +2924,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2935,7 +2935,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2946,7 +2946,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2957,7 +2957,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2968,7 +2968,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2979,7 +2979,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -2990,7 +2990,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3001,7 +3001,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3012,7 +3012,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3023,7 +3023,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3034,7 +3034,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3045,7 +3045,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3056,7 +3056,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3067,7 +3067,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#992600" strokeWidth: -1 Path { @@ -3078,7 +3078,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#992600" strokeWidth: -1 Path { @@ -3089,7 +3089,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3101,7 +3101,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3135,7 +3135,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3152,7 +3152,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3164,7 +3164,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3176,7 +3176,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3188,7 +3188,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3200,7 +3200,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3212,7 +3212,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3224,7 +3224,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3236,7 +3236,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3248,7 +3248,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3265,7 +3265,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3282,7 +3282,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3293,7 +3293,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3304,7 +3304,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3315,7 +3315,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3326,7 +3326,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3337,7 +3337,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3348,7 +3348,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3359,7 +3359,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3370,7 +3370,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3381,7 +3381,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3393,7 +3393,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3409,7 +3409,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3421,7 +3421,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3433,7 +3433,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3445,7 +3445,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3457,7 +3457,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3469,7 +3469,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3481,7 +3481,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3493,7 +3493,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3505,7 +3505,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3517,7 +3517,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3529,7 +3529,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3541,7 +3541,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3553,7 +3553,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3565,7 +3565,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3577,7 +3577,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3589,7 +3589,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3601,7 +3601,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3613,7 +3613,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3625,7 +3625,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3637,7 +3637,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3649,7 +3649,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3661,7 +3661,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3673,7 +3673,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3685,7 +3685,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3697,7 +3697,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#ffffff" strokeColor: "#000000" strokeWidth: 0.1 @@ -3709,7 +3709,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3720,7 +3720,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3731,7 +3731,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3742,7 +3742,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3753,7 +3753,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3764,7 +3764,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#000000" strokeWidth: -1 Path { @@ -3775,7 +3775,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3786,7 +3786,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3801,7 +3801,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3816,7 +3816,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3833,7 +3833,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3846,7 +3846,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3862,7 +3862,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3874,7 +3874,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3899,7 +3899,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3911,7 +3911,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3922,7 +3922,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3933,7 +3933,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3944,7 +3944,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3958,7 +3958,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3969,7 +3969,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3981,7 +3981,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -3993,7 +3993,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4003,7 +4003,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4015,7 +4015,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4026,7 +4026,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4037,7 +4037,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4048,7 +4048,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "#cccccc" strokeWidth: -1 Path { @@ -4059,7 +4059,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#000000" strokeWidth: 1 @@ -4069,7 +4069,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#000000" strokeWidth: 1 @@ -4079,7 +4079,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#000000" strokeWidth: 1 @@ -4089,7 +4089,7 @@ PathItem { } } - VisualPath { + ShapePath { fillColor: "transparent" strokeColor: "#000000" strokeWidth: 1 diff --git a/examples/quick/pathitem/main.cpp b/examples/quick/shapes/main.cpp index 3a81c4da05..3a81c4da05 100644 --- a/examples/quick/pathitem/main.cpp +++ b/examples/quick/shapes/main.cpp diff --git a/examples/quick/pathitem/pathitem.pro b/examples/quick/shapes/shapes.pro index b0ff0537cf..1b953f56ca 100644 --- a/examples/quick/pathitem/pathitem.pro +++ b/examples/quick/shapes/shapes.pro @@ -2,7 +2,7 @@ TEMPLATE = app QT += quick qml SOURCES += main.cpp -RESOURCES += pathitem.qrc +RESOURCES += shapes.qrc OTHER_FILES += content/pathitem.qml \ content/pathitemgallery.qml \ content/pathiteminteract.qml \ @@ -25,5 +25,5 @@ OTHER_FILES += content/pathitem.qml \ content/item15.qml \ content/item17.qml -target.path = $$[QT_INSTALL_EXAMPLES]/quick/pathitem +target.path = $$[QT_INSTALL_EXAMPLES]/quick/shapes INSTALLS += target diff --git a/examples/quick/pathitem/pathitem.qrc b/examples/quick/shapes/shapes.qrc index 533ba090bc..533ba090bc 100644 --- a/examples/quick/pathitem/pathitem.qrc +++ b/examples/quick/shapes/shapes.qrc diff --git a/src/imports/imports.pro b/src/imports/imports.pro index df0ad01c06..3c7f96eff9 100644 --- a/src/imports/imports.pro +++ b/src/imports/imports.pro @@ -23,7 +23,7 @@ qtHaveModule(quick) { qtConfig(quick-particles): \ SUBDIRS += particles - SUBDIRS += pathitem + SUBDIRS += shapes } qtHaveModule(xmlpatterns) : SUBDIRS += xmllistmodel diff --git a/src/imports/pathitem/pathitem.pro b/src/imports/pathitem/pathitem.pro deleted file mode 100644 index d70bb6f203..0000000000 --- a/src/imports/pathitem/pathitem.pro +++ /dev/null @@ -1,31 +0,0 @@ -CXX_MODULE = qml -TARGET = qmlpathitemplugin -TARGETPATH = Qt/labs/pathitem -IMPORT_VERSION = 1.0 - -QT = core gui qml quick quick-private - -HEADERS += \ - qquickpathitem_p.h \ - qquickpathitem_p_p.h \ - qquickpathitemgenericrenderer_p.h \ - qquickpathitemsoftwarerenderer_p.h - -SOURCES += \ - plugin.cpp \ - qquickpathitem.cpp \ - qquickpathitemgenericrenderer.cpp \ - qquickpathitemsoftwarerenderer.cpp - -qtConfig(opengl) { - HEADERS += \ - qquicknvprfunctions_p.h \ - qquicknvprfunctions_p_p.h \ - qquickpathitemnvprrenderer_p.h - - SOURCES += \ - qquicknvprfunctions.cpp \ - qquickpathitemnvprrenderer.cpp -} - -load(qml_plugin) diff --git a/src/imports/pathitem/qmldir b/src/imports/pathitem/qmldir deleted file mode 100644 index 277b8a199b..0000000000 --- a/src/imports/pathitem/qmldir +++ /dev/null @@ -1,4 +0,0 @@ -module Qt.labs.pathitem -plugin qmlpathitemplugin -classname QmlPathItemPlugin -typeinfo plugins.qmltypes diff --git a/src/imports/pathitem/qquickpathitem.cpp b/src/imports/pathitem/qquickpathitem.cpp deleted file mode 100644 index 5255a55798..0000000000 --- a/src/imports/pathitem/qquickpathitem.cpp +++ /dev/null @@ -1,2258 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQuick module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qquickpathitem_p.h" -#include "qquickpathitem_p_p.h" -#include "qquickpathitemgenericrenderer_p.h" -#include "qquickpathitemnvprrenderer_p.h" -#include "qquickpathitemsoftwarerenderer_p.h" -#include <private/qsgtexture_p.h> -#include <private/qquicksvgparser_p.h> -#include <QtGui/private/qdrawhelper_p.h> -#include <QOpenGLFunctions> - -#include <private/qv4engine_p.h> -#include <private/qv4object_p.h> -#include <private/qv4qobjectwrapper_p.h> -#include <private/qv4mm_p.h> -#include <private/qqmlengine_p.h> - -QT_BEGIN_NAMESPACE - -QQuickPathItemStrokeFillParams::QQuickPathItemStrokeFillParams() - : strokeColor(Qt::white), - strokeWidth(1), - fillColor(Qt::white), - fillRule(QQuickVisualPath::OddEvenFill), - joinStyle(QQuickVisualPath::BevelJoin), - miterLimit(2), - capStyle(QQuickVisualPath::SquareCap), - strokeStyle(QQuickVisualPath::SolidLine), - dashOffset(0), - fillGradient(nullptr) -{ - dashPattern << 4 << 2; // 4 * strokeWidth dash followed by 2 * strokeWidth space -} - -QPainterPath QQuickPathItemPath::toPainterPath() const -{ - QPainterPath p; - int coordIdx = 0; - for (int i = 0; i < cmd.count(); ++i) { - switch (cmd[i]) { - case QQuickPathItemPath::MoveTo: - p.moveTo(coords[coordIdx], coords[coordIdx + 1]); - coordIdx += 2; - break; - case QQuickPathItemPath::LineTo: - p.lineTo(coords[coordIdx], coords[coordIdx + 1]); - coordIdx += 2; - break; - case QQuickPathItemPath::QuadTo: - p.quadTo(coords[coordIdx], coords[coordIdx + 1], - coords[coordIdx + 2], coords[coordIdx + 3]); - coordIdx += 4; - break; - case QQuickPathItemPath::CubicTo: - p.cubicTo(coords[coordIdx], coords[coordIdx + 1], - coords[coordIdx + 2], coords[coordIdx + 3], - coords[coordIdx + 4], coords[coordIdx + 5]); - coordIdx += 6; - break; - case QQuickPathItemPath::ArcTo: - // does not map to the QPainterPath API; reuse the helper code from QQuickSvgParser - QQuickSvgParser::pathArc(p, - coords[coordIdx], coords[coordIdx + 1], // radius - coords[coordIdx + 2], // xAxisRotation - !qFuzzyIsNull(coords[coordIdx + 6]), // useLargeArc - !qFuzzyIsNull(coords[coordIdx + 5]), // sweep flag - coords[coordIdx + 3], coords[coordIdx + 4], // end - p.currentPosition().x(), p.currentPosition().y()); - coordIdx += 7; - break; - default: - qWarning("Unknown JS path command: %d", cmd[i]); - break; - } - } - return p; -} - -/*! - \qmltype VisualPath - \instantiates QQuickVisualPath - \inqmlmodule QtQuick - \ingroup qtquick-paths - \ingroup qtquick-views - \inherits Object - \brief Describes a Path and associated properties for stroking and filling - \since 5.10 - - A PathItem contains one or more VisualPath elements. At least one - VisualPath is necessary in order to have a PathItem output anything - visible. A VisualPath in turn contains a Path and properties describing the - stroking and filling parameters, such as the stroke width and color, the - fill color or gradient, join and cap styles, and so on. Finally, the Path - object contains a list of path elements like PathMove, PathLine, PathCubic, - PathQuad, PathArc. - - Any property changes in these data sets will be bubble up and change the - output of the PathItem. This means that it is simple and easy to change, or - even animate, the starting and ending position, control points, or any - stroke or fill parameters using the usual QML bindings and animation types - like NumberAnimation. - - In the following example the line join style changes automatically based on - the value of joinStyleIndex: - - \code - VisualPath { - strokeColor: "black" - strokeWidth: 16 - fillColor: "transparent" - capStyle: VisualPath.RoundCap - - property int joinStyleIndex: 0 - property variant styles: [ VisualPath.BevelJoin, VisualPath.MiterJoin, VisualPath.RoundJoin ] - - joinStyle: styles[joinStyleIndex] - - Path { - startX: 30 - startY: 30 - PathLine { x: 100; y: 100 } - PathLine { x: 30; y: 100 } - } - } - \endcode - - Once associated with a PathItem, here is the output with a joinStyleIndex - of 2 (VisualPath.RoundJoin): - - \image visualpath-code-example.png - */ - -QQuickVisualPathPrivate::QQuickVisualPathPrivate() - : path(nullptr), - dirty(DirtyAll) -{ -} - -QQuickVisualPath::QQuickVisualPath(QObject *parent) - : QObject(*(new QQuickVisualPathPrivate), parent) -{ -} - -QQuickVisualPath::~QQuickVisualPath() -{ -} - -/*! - \qmlproperty Path QtQuick::VisualPath::path - - This property holds the Path object. - - \default - */ - -QQuickPath *QQuickVisualPath::path() const -{ - Q_D(const QQuickVisualPath); - return d->path; -} - -void QQuickVisualPath::setPath(QQuickPath *path) -{ - Q_D(QQuickVisualPath); - if (d->path == path) - return; - - if (d->path) - qmlobject_disconnect(d->path, QQuickPath, SIGNAL(changed()), - this, QQuickVisualPath, SLOT(_q_pathChanged())); - d->path = path; - qmlobject_connect(d->path, QQuickPath, SIGNAL(changed()), - this, QQuickVisualPath, SLOT(_q_pathChanged())); - - d->dirty |= QQuickVisualPathPrivate::DirtyPath; - emit pathChanged(); - emit changed(); -} - -void QQuickVisualPathPrivate::_q_pathChanged() -{ - Q_Q(QQuickVisualPath); - dirty |= DirtyPath; - emit q->changed(); -} - -/*! - \qmlproperty color QtQuick::VisualPath::strokeColor - - This property holds the stroking color. - - When set to \c transparent, no stroking occurs. - - The default value is \c white. - */ - -QColor QQuickVisualPath::strokeColor() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.strokeColor; -} - -void QQuickVisualPath::setStrokeColor(const QColor &color) -{ - Q_D(QQuickVisualPath); - if (d->sfp.strokeColor != color) { - d->sfp.strokeColor = color; - d->dirty |= QQuickVisualPathPrivate::DirtyStrokeColor; - emit strokeColorChanged(); - emit changed(); - } -} - -/*! - \qmlproperty color QtQuick::VisualPath::strokeWidth - - This property holds the stroke width. - - When set to a negative value, no stroking occurs. - - The default value is 1. - */ - -qreal QQuickVisualPath::strokeWidth() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.strokeWidth; -} - -void QQuickVisualPath::setStrokeWidth(qreal w) -{ - Q_D(QQuickVisualPath); - if (d->sfp.strokeWidth != w) { - d->sfp.strokeWidth = w; - d->dirty |= QQuickVisualPathPrivate::DirtyStrokeWidth; - emit strokeWidthChanged(); - emit changed(); - } -} - -/*! - \qmlproperty color QtQuick::VisualPath::fillColor - - This property holds the fill color. - - When set to \c transparent, no filling occurs. - - The default value is \c white. - */ - -QColor QQuickVisualPath::fillColor() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.fillColor; -} - -void QQuickVisualPath::setFillColor(const QColor &color) -{ - Q_D(QQuickVisualPath); - if (d->sfp.fillColor != color) { - d->sfp.fillColor = color; - d->dirty |= QQuickVisualPathPrivate::DirtyFillColor; - emit fillColorChanged(); - emit changed(); - } -} - -/*! - \qmlproperty enumeration QtQuick::VisualPath::fillRule - - This property holds the fill rule. The default value is - VisualPath.OddEvenFill. For an example on fill rules, see - QPainterPath::setFillRule(). - - \list - \li VisualPath.OddEvenFill - \li VisualPath.WindingFill - \endlist - */ - -QQuickVisualPath::FillRule QQuickVisualPath::fillRule() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.fillRule; -} - -void QQuickVisualPath::setFillRule(FillRule fillRule) -{ - Q_D(QQuickVisualPath); - if (d->sfp.fillRule != fillRule) { - d->sfp.fillRule = fillRule; - d->dirty |= QQuickVisualPathPrivate::DirtyFillRule; - emit fillRuleChanged(); - emit changed(); - } -} - -/*! - \qmlproperty enumeration QtQuick::VisualPath::joinStyle - - This property defines how joins between two connected lines are drawn. The - default value is VisualPath.BevelJoin. - - \list - \li VisualPath.MiterJoin - The outer edges of the lines are extended to meet at an angle, and this area is filled. - \li VisualPath.BevelJoin - The triangular notch between the two lines is filled. - \li VisualPath.RoundJoin - A circular arc between the two lines is filled. - \endlist - */ - -QQuickVisualPath::JoinStyle QQuickVisualPath::joinStyle() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.joinStyle; -} - -void QQuickVisualPath::setJoinStyle(JoinStyle style) -{ - Q_D(QQuickVisualPath); - if (d->sfp.joinStyle != style) { - d->sfp.joinStyle = style; - d->dirty |= QQuickVisualPathPrivate::DirtyStyle; - emit joinStyleChanged(); - emit changed(); - } -} - -/*! - \qmlproperty int QtQuick::VisualPath::miterLimit - - When VisualPath.joinStyle is set to VisualPath.MiterJoin, this property - specifies how far the miter join can extend from the join point. - - The default value is 2. - */ - -int QQuickVisualPath::miterLimit() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.miterLimit; -} - -void QQuickVisualPath::setMiterLimit(int limit) -{ - Q_D(QQuickVisualPath); - if (d->sfp.miterLimit != limit) { - d->sfp.miterLimit = limit; - d->dirty |= QQuickVisualPathPrivate::DirtyStyle; - emit miterLimitChanged(); - emit changed(); - } -} - -/*! - \qmlproperty enumeration QtQuick::VisualPath::capStyle - - This property defines how the end points of lines are drawn. The - default value is VisualPath.SquareCap. - - \list - \li VisualPath.FlatCap - A square line end that does not cover the end point of the line. - \li VisualPath.SquareCap - A square line end that covers the end point and extends beyond it by half the line width. - \li VisualPath.RoundCap - A rounded line end. - \endlist - */ - -QQuickVisualPath::CapStyle QQuickVisualPath::capStyle() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.capStyle; -} - -void QQuickVisualPath::setCapStyle(CapStyle style) -{ - Q_D(QQuickVisualPath); - if (d->sfp.capStyle != style) { - d->sfp.capStyle = style; - d->dirty |= QQuickVisualPathPrivate::DirtyStyle; - emit capStyleChanged(); - emit changed(); - } -} - -/*! - \qmlproperty enumeration QtQuick::VisualPath::strokeStyle - - This property defines the style of stroking. The default value is - VisualPath.SolidLine. - - \list - \li VisualPath.SolidLine - A plain line. - \li VisualPath.DashLine - Dashes separated by a few pixels. - \endlist - */ - -QQuickVisualPath::StrokeStyle QQuickVisualPath::strokeStyle() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.strokeStyle; -} - -void QQuickVisualPath::setStrokeStyle(StrokeStyle style) -{ - Q_D(QQuickVisualPath); - if (d->sfp.strokeStyle != style) { - d->sfp.strokeStyle = style; - d->dirty |= QQuickVisualPathPrivate::DirtyDash; - emit strokeStyleChanged(); - emit changed(); - } -} - -/*! - \qmlproperty real QtQuick::VisualPath::dashOffset - - This property defines the starting point on the dash pattern, measured in - units used to specify the dash pattern. - - The default value is 0. - - \sa QPen::setDashOffset() - */ - -qreal QQuickVisualPath::dashOffset() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.dashOffset; -} - -void QQuickVisualPath::setDashOffset(qreal offset) -{ - Q_D(QQuickVisualPath); - if (d->sfp.dashOffset != offset) { - d->sfp.dashOffset = offset; - d->dirty |= QQuickVisualPathPrivate::DirtyDash; - emit dashOffsetChanged(); - emit changed(); - } -} - -/*! - \qmlproperty list<real> QtQuick::VisualPath::dashPattern - - This property defines the dash pattern when VisualPath.strokeStyle is set - to VisualPath.DashLine. The pattern must be specified as an even number of - positive entries where the entries 1, 3, 5... are the dashes and 2, 4, 6... - are the spaces. The pattern is specified in units of the pen's width. - - The default value is (4, 2), meaning a dash of 4 * VisualPath.strokeWidth - pixels followed by a space of 2 * VisualPath.strokeWidth pixels. - - \sa QPen::setDashPattern() - */ - -QVector<qreal> QQuickVisualPath::dashPattern() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.dashPattern; -} - -void QQuickVisualPath::setDashPattern(const QVector<qreal> &array) -{ - Q_D(QQuickVisualPath); - if (d->sfp.dashPattern != array) { - d->sfp.dashPattern = array; - d->dirty |= QQuickVisualPathPrivate::DirtyDash; - emit dashPatternChanged(); - emit changed(); - } -} - -/*! - \qmlproperty PathGradient QtQuick::VisualPath::fillGradient - - This property defines the fill gradient. By default no gradient is enabled - and the value is \c null. In this case the fill uses a solid color based on - the value of VisuaLPath.fillColor. - - When set, VisualPath.fillColor is ignored and filling is done using one of - the PathGradient subtypes. - */ - -QQuickPathGradient *QQuickVisualPath::fillGradient() const -{ - Q_D(const QQuickVisualPath); - return d->sfp.fillGradient; -} - -void QQuickVisualPath::setFillGradient(QQuickPathGradient *gradient) -{ - Q_D(QQuickVisualPath); - if (d->sfp.fillGradient != gradient) { - if (d->sfp.fillGradient) - qmlobject_disconnect(d->sfp.fillGradient, QQuickPathGradient, SIGNAL(updated()), - this, QQuickVisualPath, SLOT(_q_fillGradientChanged())); - d->sfp.fillGradient = gradient; - if (d->sfp.fillGradient) - qmlobject_connect(d->sfp.fillGradient, QQuickPathGradient, SIGNAL(updated()), - this, QQuickVisualPath, SLOT(_q_fillGradientChanged())); - d->dirty |= QQuickVisualPathPrivate::DirtyFillGradient; - emit changed(); - } -} - -void QQuickVisualPathPrivate::_q_fillGradientChanged() -{ - Q_Q(QQuickVisualPath); - dirty |= DirtyFillGradient; - emit q->changed(); -} - -void QQuickVisualPath::resetFillGradient() -{ - setFillGradient(nullptr); -} - -/*! - \qmltype PathItem - \instantiates QQuickPathItem - \inqmlmodule QtQuick - \ingroup qtquick-paths - \ingroup qtquick-views - \inherits Item - \brief Renders a path - \since 5.10 - - Renders a path either by generating geometry via QPainterPath and manual - triangulation or by using a GPU vendor extension like \c{GL_NV_path_rendering}. - - This approach is different from rendering shapes via QQuickPaintedItem or - the 2D Canvas because the path never gets rasterized in software. Therefore - PathItem is suitable for creating shapes spreading over larger areas of the - screen, avoiding the performance penalty for texture uploads or framebuffer - blits. In addition, the declarative API allows manipulating, binding to, - and even animating the path element properties like starting and ending - position, the control points, etc. - - The types for specifying path elements are shared between \l PathView and - PathItem. However, not all PathItem implementations support all path - element types, while some may not make sense for PathView. PathItem's - currently supported subset is: PathMove, PathLine, PathQuad, PathCubic, - PathArc, PathSvg. - - See \l Path for a detailed overview of the supported path elements. - - \code - PathItem { - width: 200 - height: 150 - anchors.centerIn: parent - VisualPath { - strokeWidth: 4 - strokeColor: "red" - fillGradient: PathLinearGradient { - x1: 20; y1: 20 - x2: 180; y2: 130 - PathGradientStop { position: 0; color: "blue" } - PathGradientStop { position: 0.2; color: "green" } - PathGradientStop { position: 0.4; color: "red" } - PathGradientStop { position: 0.6; color: "yellow" } - PathGradientStop { position: 1; color: "cyan" } - } - strokeStyle: VisualPath.DashLine - dashPattern: [ 1, 4 ] - Path { - startX: 20; startY: 20 - PathLine { x: 180; y: 130 } - PathLine { x: 20; y: 130 } - PathLine { x: 20; y: 20 } - } - } - } - \endcode - - \image pathitem-code-example.png - - \note It is important to be aware of performance implications, in - particular when the application is running on the generic PathItem - implementation due to not having support for accelerated path rendering. - The geometry generation happens entirely on the CPU in this case, and this - is potentially expensive. Changing the set of path elements, changing the - properties of these elements, or changing certain properties of the - PathItem itself all lead to retriangulation on every change. Therefore, - applying animation to such properties can heavily affect performance on - less powerful systems. If animating properties other than stroke and fill - colors is a must, it is recommended to target systems providing - \c{GL_NV_path_rendering} where the cost of path property changes is much - smaller. - - The following list summarizes the available PathItem rendering approaches: - - \list - - \li When running with the default, OpenGL backend of Qt Quick, both the - generic, triangulation-based and the NVIDIA-specific - \c{GL_NV_path_rendering} methods are available. The choice is made at - runtime, depending on the graphics driver's capabilities. When this is not - desired, applications can force using the generic method by setting the - PathItem.enableVendorExtensions property to \c false. - - \li The \c software backend is fully supported. The path is rendered via - QPainter::strokePath() and QPainter::fillPath() in this case. - - \li The Direct 3D 12 backend is not currently supported. - - \li The OpenVG backend is not currently supported. - - \endlist - - \sa Path, PathMove, PathLine, PathQuad, PathCubic, PathArc, PathSvg -*/ - -QQuickPathItemPrivate::QQuickPathItemPrivate() - : componentComplete(true), - vpChanged(false), - rendererType(QQuickPathItem::UnknownRenderer), - async(false), - status(QQuickPathItem::Null), - renderer(nullptr), - enableVendorExts(true) -{ -} - -QQuickPathItemPrivate::~QQuickPathItemPrivate() -{ - delete renderer; -} - -void QQuickPathItemPrivate::_q_visualPathChanged() -{ - Q_Q(QQuickPathItem); - vpChanged = true; - q->polish(); -} - -void QQuickPathItemPrivate::setStatus(QQuickPathItem::Status newStatus) -{ - Q_Q(QQuickPathItem); - if (status != newStatus) { - status = newStatus; - emit q->statusChanged(); - } -} - -QQuickPathItem::QQuickPathItem(QQuickItem *parent) - : QQuickItem(*(new QQuickPathItemPrivate), parent) -{ - setFlag(ItemHasContents); -} - -QQuickPathItem::~QQuickPathItem() -{ -} - -/*! - \qmlproperty enumeration QtQuick::PathItem::rendererType - - This property determines which path rendering backend is active. - - \list - - \li PathItem.UnknownRenderer - The renderer is unknown. - - \li PathItem.GeometryRenderer - The generic, driver independent solution - for OpenGL. Uses the same CPU-based triangulation approach as QPainter's - OpenGL 2 paint engine. This is the default on non-NVIDIA hardware when the - default, OpenGL Qt Quick scenegraph backend is in use. - - \li PathItem.NvprRenderer - Path items are rendered by performing OpenGL - calls using the \c{GL_NV_path_rendering} extension. This is the default on - NVIDIA hardware when the default, OpenGL Qt Quick scenegraph backend is in - use. - - \li PathItem.SoftwareRenderer - Pure QPainter drawing using the raster - paint engine. This is the default, and only, option when the Qt Quick - scenegraph is running with the \c software backend. - - \endlist -*/ - -QQuickPathItem::RendererType QQuickPathItem::rendererType() const -{ - Q_D(const QQuickPathItem); - return d->rendererType; -} - -/*! - \qmlproperty bool QtQuick::PathItem::asynchronous - - When PathItem.rendererType is PathItem.GeometryRenderer, the input path is - triangulated on the CPU during the polishing phase of the PathItem. This is - potentially expensive. To offload this work to separate worker threads, set - this property to \c true. - - When enabled, making a PathItem visible will not wait for the content to - become available. Instead, the gui/main thread is not blocked and the - results of the path rendering are shown only when all the asynchronous work - has been finished. - - The default value is \c false. - */ - -bool QQuickPathItem::asynchronous() const -{ - Q_D(const QQuickPathItem); - return d->async; -} - -void QQuickPathItem::setAsynchronous(bool async) -{ - Q_D(QQuickPathItem); - if (d->async != async) { - d->async = async; - emit asynchronousChanged(); - if (d->componentComplete) - d->_q_visualPathChanged(); - } -} - -/*! - \qmlproperty bool QtQuick::PathItem::enableVendorExtensions - - This property controls the usage of non-standard OpenGL extensions like - GL_NV_path_rendering. To disable PathItem.NvprRenderer and force a uniform - behavior regardless of the graphics card and drivers, set this property to - \c false. - - The default value is \c true. - */ - -bool QQuickPathItem::enableVendorExtensions() const -{ - Q_D(const QQuickPathItem); - return d->enableVendorExts; -} - -void QQuickPathItem::setEnableVendorExtensions(bool enable) -{ - Q_D(QQuickPathItem); - if (d->enableVendorExts != enable) { - d->enableVendorExts = enable; - emit enableVendorExtensionsChanged(); - } -} - -/*! - \qmlproperty enumeration QtQuick::PathItem::status - - This property determines the status of the PathItem and is relevant when - PathItem.asynchronous is set to \c true. - - \list - - \li PathItem.Null - Not yet initialized. - - \li PathItem.Ready - The PathItem has finished processing. - - \li PathItem.Processing - The path is being processed. - - \endlist - */ - -QQuickPathItem::Status QQuickPathItem::status() const -{ - Q_D(const QQuickPathItem); - return d->status; -} - -static QQuickVisualPath *vpe_at(QQmlListProperty<QQuickVisualPath> *property, int index) -{ - QQuickPathItemPrivate *d = QQuickPathItemPrivate::get(static_cast<QQuickPathItem *>(property->object)); - return d->qmlData.vp.at(index); -} - -static void vpe_append(QQmlListProperty<QQuickVisualPath> *property, QQuickVisualPath *obj) -{ - QQuickPathItem *item = static_cast<QQuickPathItem *>(property->object); - QQuickPathItemPrivate *d = QQuickPathItemPrivate::get(item); - d->qmlData.vp.append(obj); - - if (d->componentComplete) { - QObject::connect(obj, SIGNAL(changed()), item, SLOT(_q_visualPathChanged())); - d->_q_visualPathChanged(); - } -} - -static int vpe_count(QQmlListProperty<QQuickVisualPath> *property) -{ - QQuickPathItemPrivate *d = QQuickPathItemPrivate::get(static_cast<QQuickPathItem *>(property->object)); - return d->qmlData.vp.count(); -} - -static void vpe_clear(QQmlListProperty<QQuickVisualPath> *property) -{ - QQuickPathItem *item = static_cast<QQuickPathItem *>(property->object); - QQuickPathItemPrivate *d = QQuickPathItemPrivate::get(item); - - for (QQuickVisualPath *p : d->qmlData.vp) - QObject::disconnect(p, SIGNAL(changed()), item, SLOT(_q_visualPathChanged())); - - d->qmlData.vp.clear(); - - if (d->componentComplete) - d->_q_visualPathChanged(); -} - -/*! - \qmlproperty list<VisualPath> QtQuick::PathItem::elements - - This property holds the VisualPath objects that define the contents of the - PathItem. - - \default - */ - -QQmlListProperty<QQuickVisualPath> QQuickPathItem::elements() -{ - return QQmlListProperty<QQuickVisualPath>(this, - nullptr, - vpe_append, - vpe_count, - vpe_at, - vpe_clear); -} - -void QQuickPathItem::classBegin() -{ - Q_D(QQuickPathItem); - d->componentComplete = false; -} - -void QQuickPathItem::componentComplete() -{ - Q_D(QQuickPathItem); - d->componentComplete = true; - - for (QQuickVisualPath *p : d->qmlData.vp) - connect(p, SIGNAL(changed()), this, SLOT(_q_visualPathChanged())); - - d->_q_visualPathChanged(); -} - -void QQuickPathItem::updatePolish() -{ - Q_D(QQuickPathItem); - - if (!d->vpChanged) - return; - - d->vpChanged = false; - - if (!d->renderer) { - d->createRenderer(); - if (!d->renderer) - return; - emit rendererChanged(); - } - - // endSync() is where expensive calculations may happen (or get kicked off - // on worker threads), depending on the backend. Therefore do this only - // when the item is visible. - if (isVisible()) - d->sync(); - - update(); -} - -void QQuickPathItem::itemChange(ItemChange change, const ItemChangeData &data) -{ - Q_D(QQuickPathItem); - - // sync may have been deferred; do it now if the item became visible - if (change == ItemVisibleHasChanged && data.boolValue) - d->_q_visualPathChanged(); - - QQuickItem::itemChange(change, data); -} - -QSGNode *QQuickPathItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *) -{ - // Called on the render thread, with the gui thread blocked. We can now - // safely access gui thread data. - - Q_D(QQuickPathItem); - if (d->renderer) { - if (!node) - node = d->createNode(); - d->renderer->updateNode(); - } - return node; -} - -// the renderer object lives on the gui thread -void QQuickPathItemPrivate::createRenderer() -{ - Q_Q(QQuickPathItem); - QSGRendererInterface *ri = q->window()->rendererInterface(); - if (!ri) - return; - - switch (ri->graphicsApi()) { -#ifndef QT_NO_OPENGL - case QSGRendererInterface::OpenGL: - if (enableVendorExts && QQuickPathItemNvprRenderNode::isSupported()) { - rendererType = QQuickPathItem::NvprRenderer; - renderer = new QQuickPathItemNvprRenderer; - } else { - rendererType = QQuickPathItem::GeometryRenderer; - renderer = new QQuickPathItemGenericRenderer(q); - } - break; -#endif - case QSGRendererInterface::Software: - rendererType = QQuickPathItem::SoftwareRenderer; - renderer = new QQuickPathItemSoftwareRenderer; - break; - default: - qWarning("No path backend for this graphics API yet"); - break; - } -} - -// the node lives on the render thread -QSGNode *QQuickPathItemPrivate::createNode() -{ - Q_Q(QQuickPathItem); - QSGNode *node = nullptr; - if (!q->window()) - return node; - QSGRendererInterface *ri = q->window()->rendererInterface(); - if (!ri) - return node; - - switch (ri->graphicsApi()) { -#ifndef QT_NO_OPENGL - case QSGRendererInterface::OpenGL: - if (enableVendorExts && QQuickPathItemNvprRenderNode::isSupported()) { - node = new QQuickPathItemNvprRenderNode; - static_cast<QQuickPathItemNvprRenderer *>(renderer)->setNode( - static_cast<QQuickPathItemNvprRenderNode *>(node)); - } else { - node = new QQuickPathItemGenericNode; - static_cast<QQuickPathItemGenericRenderer *>(renderer)->setRootNode( - static_cast<QQuickPathItemGenericNode *>(node)); - } - break; -#endif - case QSGRendererInterface::Software: - node = new QQuickPathItemSoftwareRenderNode(q); - static_cast<QQuickPathItemSoftwareRenderer *>(renderer)->setNode( - static_cast<QQuickPathItemSoftwareRenderNode *>(node)); - break; - default: - qWarning("No path backend for this graphics API yet"); - break; - } - - return node; -} - -static void q_asyncPathItemReady(void *data) -{ - QQuickPathItemPrivate *self = static_cast<QQuickPathItemPrivate *>(data); - self->setStatus(QQuickPathItem::Ready); -} - -void QQuickPathItemPrivate::sync() -{ - const bool useAsync = async && renderer->flags().testFlag(QQuickAbstractPathRenderer::SupportsAsync); - if (useAsync) { - setStatus(QQuickPathItem::Processing); - renderer->setAsyncCallback(q_asyncPathItemReady, this); - } - - if (!jsData.isValid()) { - // Standard route: The path and stroke/fill parameters are provided via - // VisualPath and Path. - const int count = qmlData.vp.count(); - renderer->beginSync(count); - - for (int i = 0; i < count; ++i) { - QQuickVisualPath *p = qmlData.vp[i]; - int &dirty(QQuickVisualPathPrivate::get(p)->dirty); - - if (dirty & QQuickVisualPathPrivate::DirtyPath) - renderer->setPath(i, p->path()); - if (dirty & QQuickVisualPathPrivate::DirtyStrokeColor) - renderer->setStrokeColor(i, p->strokeColor()); - if (dirty & QQuickVisualPathPrivate::DirtyStrokeWidth) - renderer->setStrokeWidth(i, p->strokeWidth()); - if (dirty & QQuickVisualPathPrivate::DirtyFillColor) - renderer->setFillColor(i, p->fillColor()); - if (dirty & QQuickVisualPathPrivate::DirtyFillRule) - renderer->setFillRule(i, p->fillRule()); - if (dirty & QQuickVisualPathPrivate::DirtyStyle) { - renderer->setJoinStyle(i, p->joinStyle(), p->miterLimit()); - renderer->setCapStyle(i, p->capStyle()); - } - if (dirty & QQuickVisualPathPrivate::DirtyDash) - renderer->setStrokeStyle(i, p->strokeStyle(), p->dashOffset(), p->dashPattern()); - if (dirty & QQuickVisualPathPrivate::DirtyFillGradient) - renderer->setFillGradient(i, p->fillGradient()); - - dirty = 0; - } - - renderer->endSync(useAsync); - } else { - // Path and stroke/fill params provided from JavaScript. This avoids - // QObjects at the expense of not supporting changes afterwards. - const int count = jsData.paths.count(); - renderer->beginSync(count); - - for (int i = 0; i < count; ++i) { - renderer->setJSPath(i, jsData.paths[i]); - const QQuickPathItemStrokeFillParams sfp(jsData.sfp[i]); - renderer->setStrokeColor(i, sfp.strokeColor); - renderer->setStrokeWidth(i, sfp.strokeWidth); - renderer->setFillColor(i, sfp.fillColor); - renderer->setFillRule(i, sfp.fillRule); - renderer->setJoinStyle(i, sfp.joinStyle, sfp.miterLimit); - renderer->setCapStyle(i, sfp.capStyle); - renderer->setStrokeStyle(i, sfp.strokeStyle, sfp.dashOffset, sfp.dashPattern); - renderer->setFillGradient(i, sfp.fillGradient); - } - - renderer->endSync(useAsync); - } - - if (!useAsync) - setStatus(QQuickPathItem::Ready); -} - -// ***** gradient support ***** - -/*! - \qmltype PathGradientStop - \instantiates QQuickPathGradientStop - \inqmlmodule QtQuick - \ingroup qtquick-paths - \ingroup qtquick-views - \inherits Object - \brief Defines a color at a position in a gradient - \since 5.10 - */ - -QQuickPathGradientStop::QQuickPathGradientStop(QObject *parent) - : QObject(parent), - m_position(0), - m_color(Qt::black) -{ -} - -/*! - \qmlproperty real QtQuick::PathGradientStop::position - - The position and color properties describe the color used at a given - position in a gradient, as represented by a gradient stop. - - The default value is 0. - */ - -qreal QQuickPathGradientStop::position() const -{ - return m_position; -} - -void QQuickPathGradientStop::setPosition(qreal position) -{ - if (m_position != position) { - m_position = position; - if (QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(parent())) - emit grad->updated(); - } -} - -/*! - \qmlproperty real QtQuick::PathGradientStop::color - - The position and color properties describe the color used at a given - position in a gradient, as represented by a gradient stop. - - The default value is \c black. - */ - -QColor QQuickPathGradientStop::color() const -{ - return m_color; -} - -void QQuickPathGradientStop::setColor(const QColor &color) -{ - if (m_color != color) { - m_color = color; - if (QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(parent())) - emit grad->updated(); - } -} - -/*! - \qmltype PathGradient - \instantiates QQuickPathGradient - \inqmlmodule QtQuick - \ingroup qtquick-paths - \ingroup qtquick-views - \inherits Object - \brief Base type of PathItem fill gradients - \since 5.10 - - This is an abstract base class for gradients like PathLinearGradient and - cannot be created directly. - */ - -QQuickPathGradient::QQuickPathGradient(QObject *parent) - : QObject(parent), - m_spread(PadSpread) -{ -} - -int QQuickPathGradient::countStops(QQmlListProperty<QObject> *list) -{ - QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(list->object); - Q_ASSERT(grad); - return grad->m_stops.count(); -} - -QObject *QQuickPathGradient::atStop(QQmlListProperty<QObject> *list, int index) -{ - QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(list->object); - Q_ASSERT(grad); - return grad->m_stops.at(index); -} - -void QQuickPathGradient::appendStop(QQmlListProperty<QObject> *list, QObject *stop) -{ - QQuickPathGradientStop *sstop = qobject_cast<QQuickPathGradientStop *>(stop); - if (!sstop) { - qWarning("Gradient stop list only supports QQuickPathGradientStop elements"); - return; - } - QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(list->object); - Q_ASSERT(grad); - sstop->setParent(grad); - grad->m_stops.append(sstop); -} - -/*! - \qmlproperty list<Object> QtQuick::PathGradient::stops - \default - - The list of PathGradientStop objects defining the colors at given positions - in the gradient. - */ - -QQmlListProperty<QObject> QQuickPathGradient::stops() -{ - return QQmlListProperty<QObject>(this, nullptr, - &QQuickPathGradient::appendStop, - &QQuickPathGradient::countStops, - &QQuickPathGradient::atStop, - nullptr); -} - -QGradientStops QQuickPathGradient::sortedGradientStops() const -{ - QGradientStops result; - for (int i = 0; i < m_stops.count(); ++i) { - QQuickPathGradientStop *s = static_cast<QQuickPathGradientStop *>(m_stops[i]); - int j = 0; - while (j < result.count() && result[j].first < s->position()) - ++j; - result.insert(j, QGradientStop(s->position(), s->color())); - } - return result; -} - -/*! - \qmlproperty enumeration QtQuick::PathGradient::spred - - Specifies how the area outside the gradient area should be filled. The - default value is PathGradient.PadSpread. - - \list - \li PathGradient.PadSpread - The area is filled with the closest stop color. - \li PathGradient.RepeatSpread - The gradient is repeated outside the gradient area. - \li PathGradient.ReflectSpread - The gradient is reflected outside the gradient area. - \endlist - */ - -QQuickPathGradient::SpreadMode QQuickPathGradient::spread() const -{ - return m_spread; -} - -void QQuickPathGradient::setSpread(SpreadMode mode) -{ - if (m_spread != mode) { - m_spread = mode; - emit spreadChanged(); - emit updated(); - } -} - -/*! - \qmltype PathLinearGradient - \instantiates QQuickPathLinearGradient - \inqmlmodule QtQuick - \ingroup qtquick-paths - \ingroup qtquick-views - \inherits PathGradient - \brief Linear gradient - \since 5.10 - - Linear gradients interpolate colors between start and end points. Outside - these points the gradient is either padded, reflected or repeated depending - on the spread type. - - \sa QLinearGradient - */ - -QQuickPathLinearGradient::QQuickPathLinearGradient(QObject *parent) - : QQuickPathGradient(parent) -{ -} - -/*! - \qmlproperty real QtQuick::PathLinearGradient::x1 - \qmlproperty real QtQuick::PathLinearGradient::y1 - \qmlproperty real QtQuick::PathLinearGradient::x2 - \qmlproperty real QtQuick::PathLinearGradient::y2 - - These properties define the start and end points between which color - interpolation occurs. By default both the stard and end points are set to - (0, 0). - */ - -qreal QQuickPathLinearGradient::x1() const -{ - return m_start.x(); -} - -void QQuickPathLinearGradient::setX1(qreal v) -{ - if (m_start.x() != v) { - m_start.setX(v); - emit x1Changed(); - emit updated(); - } -} - -qreal QQuickPathLinearGradient::y1() const -{ - return m_start.y(); -} - -void QQuickPathLinearGradient::setY1(qreal v) -{ - if (m_start.y() != v) { - m_start.setY(v); - emit y1Changed(); - emit updated(); - } -} - -qreal QQuickPathLinearGradient::x2() const -{ - return m_end.x(); -} - -void QQuickPathLinearGradient::setX2(qreal v) -{ - if (m_end.x() != v) { - m_end.setX(v); - emit x2Changed(); - emit updated(); - } -} - -qreal QQuickPathLinearGradient::y2() const -{ - return m_end.y(); -} - -void QQuickPathLinearGradient::setY2(qreal v) -{ - if (m_end.y() != v) { - m_end.setY(v); - emit y2Changed(); - emit updated(); - } -} - -#ifndef QT_NO_OPENGL - -// contexts sharing with each other get the same cache instance -class QQuickPathItemGradientCacheWrapper -{ -public: - QQuickPathItemGradientCache *get(QOpenGLContext *context) - { - return m_resource.value<QQuickPathItemGradientCache>(context); - } - -private: - QOpenGLMultiGroupSharedResource m_resource; -}; - -QQuickPathItemGradientCache *QQuickPathItemGradientCache::currentCache() -{ - static QQuickPathItemGradientCacheWrapper qt_path_gradient_caches; - return qt_path_gradient_caches.get(QOpenGLContext::currentContext()); -} - -// let QOpenGLContext manage the lifetime of the cached textures -QQuickPathItemGradientCache::~QQuickPathItemGradientCache() -{ - m_cache.clear(); -} - -void QQuickPathItemGradientCache::invalidateResource() -{ - m_cache.clear(); -} - -void QQuickPathItemGradientCache::freeResource(QOpenGLContext *) -{ - qDeleteAll(m_cache); - m_cache.clear(); -} - -static void generateGradientColorTable(const QQuickPathItemGradientCache::GradientDesc &gradient, - uint *colorTable, int size, float opacity) -{ - int pos = 0; - const QGradientStops &s = gradient.stops; - const bool colorInterpolation = true; - - uint alpha = qRound(opacity * 256); - uint current_color = ARGB_COMBINE_ALPHA(s[0].second.rgba(), alpha); - qreal incr = 1.0 / qreal(size); - qreal fpos = 1.5 * incr; - colorTable[pos++] = ARGB2RGBA(qPremultiply(current_color)); - - while (fpos <= s.first().first) { - colorTable[pos] = colorTable[pos - 1]; - pos++; - fpos += incr; - } - - if (colorInterpolation) - current_color = qPremultiply(current_color); - - const int sLast = s.size() - 1; - for (int i = 0; i < sLast; ++i) { - qreal delta = 1/(s[i+1].first - s[i].first); - uint next_color = ARGB_COMBINE_ALPHA(s[i + 1].second.rgba(), alpha); - if (colorInterpolation) - next_color = qPremultiply(next_color); - - while (fpos < s[i+1].first && pos < size) { - int dist = int(256 * ((fpos - s[i].first) * delta)); - int idist = 256 - dist; - if (colorInterpolation) - colorTable[pos] = ARGB2RGBA(INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist)); - else - colorTable[pos] = ARGB2RGBA(qPremultiply(INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist))); - ++pos; - fpos += incr; - } - current_color = next_color; - } - - Q_ASSERT(s.size() > 0); - - uint last_color = ARGB2RGBA(qPremultiply(ARGB_COMBINE_ALPHA(s[sLast].second.rgba(), alpha))); - for ( ; pos < size; ++pos) - colorTable[pos] = last_color; - - colorTable[size-1] = last_color; -} - -QSGTexture *QQuickPathItemGradientCache::get(const GradientDesc &grad) -{ - QSGPlainTexture *tx = m_cache[grad]; - if (!tx) { - QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); - GLuint id; - f->glGenTextures(1, &id); - f->glBindTexture(GL_TEXTURE_2D, id); - static const uint W = 1024; // texture size is 1024x1 - uint buf[W]; - generateGradientColorTable(grad, buf, W, 1.0f); - f->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, buf); - tx = new QSGPlainTexture; - tx->setTextureId(id); - switch (grad.spread) { - case QQuickPathGradient::PadSpread: - tx->setHorizontalWrapMode(QSGTexture::ClampToEdge); - tx->setVerticalWrapMode(QSGTexture::ClampToEdge); - break; - case QQuickPathGradient::RepeatSpread: - tx->setHorizontalWrapMode(QSGTexture::Repeat); - tx->setVerticalWrapMode(QSGTexture::Repeat); - break; - case QQuickPathGradient::ReflectSpread: - tx->setHorizontalWrapMode(QSGTexture::MirroredRepeat); - tx->setVerticalWrapMode(QSGTexture::MirroredRepeat); - break; - default: - qWarning("Unknown gradient spread mode %d", grad.spread); - break; - } - m_cache[grad] = tx; - } - return tx; -} - -#endif // QT_NO_OPENGL - -// ***** JS-based alternative for creating static paths, (mostly) without QObjects ***** - -class QQuickPathItemJSEngineData : public QV8Engine::Deletable -{ -public: - QQuickPathItemJSEngineData(QV4::ExecutionEngine *engine); - - QV4::PersistentValue pathProto; - QV4::PersistentValue strokeFillParamsProto; -}; - -V4_DEFINE_EXTENSION(QQuickPathItemJSEngineData, engineData) - -namespace QV4 { -namespace Heap { - -struct QQuickPathItemJSPathPrototype : Object { - void init() { Object::init(); } -}; - -struct QQuickPathItemJSPath : Object { - void init() { Object::init(); } - QQuickPathItemPathObject *obj; -}; - -struct QQuickPathItemJSStrokeFillParamsPrototype : Object { - void init() { Object::init(); } -}; - -struct QQuickPathItemJSStrokeFillParams : Object { - void init() { Object::init(); } - QQuickPathItemStrokeFillParamsObject *obj; -}; - -} // namespace Heap -} // namespace QV4 - -struct QQuickPathItemJSPathPrototype : public QV4::Object -{ - V4_OBJECT2(QQuickPathItemJSPathPrototype, QV4::Object) -public: - static QV4::Heap::QQuickPathItemJSPathPrototype *create(QV4::ExecutionEngine *engine) - { - QV4::Scope scope(engine); - auto obj = engine->memoryManager->allocObject<QQuickPathItemJSPathPrototype>(); - QV4::Scoped<QQuickPathItemJSPathPrototype> o(scope, obj); - - o->defineDefaultProperty(QStringLiteral("clear"), method_clear, 0); - o->defineDefaultProperty(QStringLiteral("moveTo"), method_moveTo, 0); - o->defineDefaultProperty(QStringLiteral("lineTo"), method_lineTo, 0); - o->defineDefaultProperty(QStringLiteral("quadTo"), method_quadTo, 0); - o->defineDefaultProperty(QStringLiteral("cubicTo"), method_cubicTo, 0); - o->defineDefaultProperty(QStringLiteral("arcTo"), method_arcTo, 0); - - return o->d(); - } - - static void method_clear(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_moveTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_lineTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_quadTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_cubicTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_arcTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); -}; - -DEFINE_OBJECT_VTABLE(QQuickPathItemJSPathPrototype); - -struct QQuickPathItemJSStrokeFillParamsPrototype : public QV4::Object -{ - V4_OBJECT2(QQuickPathItemJSStrokeFillParamsPrototype, QV4::Object) -public: - static QV4::Heap::QQuickPathItemJSStrokeFillParamsPrototype *create(QV4::ExecutionEngine *engine) - { - QV4::Scope scope(engine); - auto obj = engine->memoryManager->allocObject<QQuickPathItemJSStrokeFillParamsPrototype>(); - QV4::Scoped<QQuickPathItemJSStrokeFillParamsPrototype> o(scope, obj); - - o->defineDefaultProperty(QStringLiteral("clear"), method_clear, 0); - - return o->d(); - } - - static void method_clear(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); -}; - -DEFINE_OBJECT_VTABLE(QQuickPathItemJSStrokeFillParamsPrototype); - -struct QQuickPathItemJSPath : public QV4::Object -{ - V4_OBJECT2(QQuickPathItemJSPath, QV4::Object) -}; - -DEFINE_OBJECT_VTABLE(QQuickPathItemJSPath); - -struct QQuickPathItemJSStrokeFillParams : public QV4::Object -{ - V4_OBJECT2(QQuickPathItemJSStrokeFillParams, QV4::Object) - - static void method_get_strokeColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_strokeColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_strokeWidth(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_strokeWidth(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_fillColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_fillColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_fillRule(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_fillRule(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_joinStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_joinStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_miterLimit(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_miterLimit(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_capStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_capStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_strokeStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_strokeStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_dashOffset(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_dashOffset(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_dashPattern(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_dashPattern(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_get_fillGradient(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); - static void method_set_fillGradient(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData); -}; - -DEFINE_OBJECT_VTABLE(QQuickPathItemJSStrokeFillParams); - -void QQuickPathItemJSPathPrototype::method_clear(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - r->d()->obj->clear(); - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSPathPrototype::method_moveTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - if (callData->argc >= 2) { - QQuickPathItemPathObject *p = r->d()->obj; - p->path.cmd.append(QQuickPathItemPath::MoveTo); - p->path.coords.append(callData->args[0].toNumber()); - p->path.coords.append(callData->args[1].toNumber()); - } - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSPathPrototype::method_lineTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - if (callData->argc >= 2) { - QQuickPathItemPathObject *p = r->d()->obj; - p->path.cmd.append(QQuickPathItemPath::LineTo); - p->path.coords.append(callData->args[0].toNumber()); - p->path.coords.append(callData->args[1].toNumber()); - } - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSPathPrototype::method_quadTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - if (callData->argc >= 4) { - QQuickPathItemPathObject *p = r->d()->obj; - p->path.cmd.append(QQuickPathItemPath::QuadTo); - const QV4::Value *v = callData->args; - p->path.coords.append(v[0].toNumber()); // cx - p->path.coords.append(v[1].toNumber()); // cy - p->path.coords.append(v[2].toNumber()); // x - p->path.coords.append(v[3].toNumber()); // y - } - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSPathPrototype::method_cubicTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - if (callData->argc >= 6) { - QQuickPathItemPathObject *p = r->d()->obj; - p->path.cmd.append(QQuickPathItemPath::CubicTo); - const QV4::Value *v = callData->args; - p->path.coords.append(v[0].toNumber()); // c1x - p->path.coords.append(v[1].toNumber()); // c1y - p->path.coords.append(v[2].toNumber()); // c2x - p->path.coords.append(v[3].toNumber()); // c2y - p->path.coords.append(v[4].toNumber()); // x - p->path.coords.append(v[5].toNumber()); // y - } - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSPathPrototype::method_arcTo(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSPath> r(scope, callData->thisObject.as<QQuickPathItemJSPath>()); - - if (callData->argc >= 7) { - QQuickPathItemPathObject *p = r->d()->obj; - p->path.cmd.append(QQuickPathItemPath::ArcTo); - const QV4::Value *v = callData->args; - p->path.coords.append(v[0].toNumber()); // radiusX - p->path.coords.append(v[1].toNumber()); // radiusY - p->path.coords.append(v[2].toNumber()); // xAxisRotation - p->path.coords.append(v[3].toNumber()); // x - p->path.coords.append(v[4].toNumber()); // y - p->path.coords.append(v[5].toNumber()); // sweepFlag - p->path.coords.append(v[6].toNumber()); // largeArc - } - - scope.result = callData->thisObject.asReturnedValue(); -} - -void QQuickPathItemJSStrokeFillParamsPrototype::method_clear(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - r->d()->obj->clear(); - - scope.result = callData->thisObject.asReturnedValue(); -} - -Q_QUICK_PRIVATE_EXPORT QColor qt_color_from_string(const QV4::Value &name); // qquickcontext2d.cpp - -static inline QString qt_color_string(const QColor &color) -{ - if (color.alpha() == 255) - return color.name(); - QString alphaString = QString::number(color.alphaF(), 'f'); - while (alphaString.endsWith(QLatin1Char('0'))) - alphaString.chop(1); - if (alphaString.endsWith(QLatin1Char('.'))) - alphaString += QLatin1Char('0'); - return QString::fromLatin1("rgba(%1, %2, %3, %4)").arg(color.red()).arg(color.green()).arg(color.blue()).arg(alphaString); -} - -void QQuickPathItemJSStrokeFillParams::method_get_strokeColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = QV4::Encode(scope.engine->newString(qt_color_string(r->d()->obj->sfp.strokeColor))); -} - -void QQuickPathItemJSStrokeFillParams::method_set_strokeColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isString()) - r->d()->obj->sfp.strokeColor = qt_color_from_string(value); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_strokeWidth(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.strokeWidth); -} - -void QQuickPathItemJSStrokeFillParams::method_set_strokeWidth(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - r->d()->obj->sfp.strokeWidth = value->toNumber(); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_fillColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = QV4::Encode(scope.engine->newString(qt_color_string(r->d()->obj->sfp.fillColor))); -} - -void QQuickPathItemJSStrokeFillParams::method_set_fillColor(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isString()) - r->d()->obj->sfp.fillColor = qt_color_from_string(value); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_fillRule(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.fillRule); -} - -void QQuickPathItemJSStrokeFillParams::method_set_fillRule(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isInt32()) - r->d()->obj->sfp.fillRule = QQuickVisualPath::FillRule(value->integerValue()); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_joinStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.joinStyle); -} - -void QQuickPathItemJSStrokeFillParams::method_set_joinStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isInt32()) - r->d()->obj->sfp.joinStyle = QQuickVisualPath::JoinStyle(value->integerValue()); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_miterLimit(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.miterLimit); -} - -void QQuickPathItemJSStrokeFillParams::method_set_miterLimit(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - r->d()->obj->sfp.miterLimit = value->toNumber(); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_capStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.capStyle); -} - -void QQuickPathItemJSStrokeFillParams::method_set_capStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isInt32()) - r->d()->obj->sfp.capStyle = QQuickVisualPath::CapStyle(value->integerValue()); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_strokeStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.strokeStyle); -} - -void QQuickPathItemJSStrokeFillParams::method_set_strokeStyle(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isInt32()) - r->d()->obj->sfp.strokeStyle = QQuickVisualPath::StrokeStyle(value->integerValue()); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_dashOffset(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = scope.engine->fromVariant(r->d()->obj->sfp.dashOffset); -} - -void QQuickPathItemJSStrokeFillParams::method_set_dashOffset(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - r->d()->obj->sfp.dashOffset = value->toNumber(); - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_dashPattern(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedArrayObject a(scope, scope.engine->newArrayObject()); - QQuickPathItemStrokeFillParamsObject *p = r->d()->obj; - a->arrayReserve(p->sfp.dashPattern.count()); - QV4::ScopedValue v(scope); - for (int i = 0; i < p->sfp.dashPattern.count(); ++i) - a->arrayPut(i, (v = scope.engine->fromVariant(p->sfp.dashPattern[i]))); - a->setArrayLengthUnchecked(p->sfp.dashPattern.count()); - - scope.result = a.asReturnedValue(); -} - -void QQuickPathItemJSStrokeFillParams::method_set_dashPattern(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - if (value->isObject()) { - QV4::Scoped<QV4::ArrayObject> ao(scope, value); - if (!!ao) { - QQuickPathItemStrokeFillParamsObject *p = r->d()->obj; - p->sfp.dashPattern.resize(ao->getLength()); - QV4::ScopedValue val(scope); - for (int i = 0; i < p->sfp.dashPattern.count(); ++i) { - val = ao->getIndexed(i); - p->sfp.dashPattern[i] = val->toNumber(); - } - } - } - - scope.result = QV4::Encode::undefined(); -} - -void QQuickPathItemJSStrokeFillParams::method_get_fillGradient(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - scope.result = r->d()->obj->v4fillGradient.value(); -} - -void QQuickPathItemJSStrokeFillParams::method_set_fillGradient(const QV4::BuiltinFunction *, QV4::Scope &scope, QV4::CallData *callData) -{ - QV4::Scoped<QQuickPathItemJSStrokeFillParams> r(scope, callData->thisObject.as<QQuickPathItemJSStrokeFillParams>()); - - QV4::ScopedValue value(scope, callData->argument(0)); - QV4::Scoped<QV4::QObjectWrapper> qobjectWrapper(scope, value); - if (!!qobjectWrapper) { - if (QQuickPathGradient *grad = qobject_cast<QQuickPathGradient *>(qobjectWrapper->object())) { - r->d()->obj->v4fillGradient.set(scope.engine, value); - r->d()->obj->sfp.fillGradient = grad; - } - } else { - r->d()->obj->v4fillGradient.set(scope.engine, nullptr); - r->d()->obj->sfp.fillGradient = nullptr; - } - - scope.result = QV4::Encode::undefined(); -} - -QQuickPathItemJSEngineData::QQuickPathItemJSEngineData(QV4::ExecutionEngine *v4) -{ - QV4::Scope scope(v4); - - QV4::ScopedObject proto(scope, QQuickPathItemJSPathPrototype::create(v4)); - pathProto = proto; - - proto = QV4::ScopedObject(scope, QQuickPathItemJSStrokeFillParamsPrototype::create(v4)); - - proto->defineAccessorProperty(QStringLiteral("strokeColor"), - QQuickPathItemJSStrokeFillParams::method_get_strokeColor, - QQuickPathItemJSStrokeFillParams::method_set_strokeColor); - proto->defineAccessorProperty(QStringLiteral("strokeWidth"), - QQuickPathItemJSStrokeFillParams::method_get_strokeWidth, - QQuickPathItemJSStrokeFillParams::method_set_strokeWidth); - proto->defineAccessorProperty(QStringLiteral("fillColor"), - QQuickPathItemJSStrokeFillParams::method_get_fillColor, - QQuickPathItemJSStrokeFillParams::method_set_fillColor); - proto->defineAccessorProperty(QStringLiteral("fillRule"), - QQuickPathItemJSStrokeFillParams::method_get_fillRule, - QQuickPathItemJSStrokeFillParams::method_set_fillRule); - proto->defineAccessorProperty(QStringLiteral("joinStyle"), - QQuickPathItemJSStrokeFillParams::method_get_joinStyle, - QQuickPathItemJSStrokeFillParams::method_set_joinStyle); - proto->defineAccessorProperty(QStringLiteral("miterLimit"), - QQuickPathItemJSStrokeFillParams::method_get_miterLimit, - QQuickPathItemJSStrokeFillParams::method_set_miterLimit); - proto->defineAccessorProperty(QStringLiteral("capStyle"), - QQuickPathItemJSStrokeFillParams::method_get_capStyle, - QQuickPathItemJSStrokeFillParams::method_set_capStyle); - proto->defineAccessorProperty(QStringLiteral("strokeStyle"), - QQuickPathItemJSStrokeFillParams::method_get_strokeStyle, - QQuickPathItemJSStrokeFillParams::method_set_strokeStyle); - proto->defineAccessorProperty(QStringLiteral("dashOffset"), - QQuickPathItemJSStrokeFillParams::method_get_dashOffset, - QQuickPathItemJSStrokeFillParams::method_set_dashOffset); - proto->defineAccessorProperty(QStringLiteral("dashPattern"), - QQuickPathItemJSStrokeFillParams::method_get_dashPattern, - QQuickPathItemJSStrokeFillParams::method_set_dashPattern); - proto->defineAccessorProperty(QStringLiteral("fillGradient"), - QQuickPathItemJSStrokeFillParams::method_get_fillGradient, - QQuickPathItemJSStrokeFillParams::method_set_fillGradient); - - strokeFillParamsProto = proto; -} - -void QQuickPathItemPathObject::setV4Engine(QV4::ExecutionEngine *engine) -{ - QQuickPathItemJSEngineData *ed = engineData(engine); - QV4::Scope scope(engine); - QV4::Scoped<QQuickPathItemJSPath> wrapper(scope, engine->memoryManager->allocObject<QQuickPathItemJSPath>()); - QV4::ScopedObject p(scope, ed->pathProto.value()); - wrapper->setPrototype(p); - wrapper->d()->obj = this; - m_v4value = wrapper; -} - -/*! - \qmltype JSPath - \inqmlmodule QtQuick - \ingroup qtquick-path - \brief Describes a path via a JavaScript API - */ - -/*! - \qmlmethod void QtQuick::JSPath::moveTo(x, y) - - Moves the path's position to the absolute position specified by (\a x, \a y). - */ - -/*! - \qmlmethod void QtQuick::JSPath::lineTo(x, y) - - Defines a straight line to the absolute position specified by (\a x, \a y). - */ - -/*! - \qmlmethod void QtQuick::JSPath::quadTo(cx, cy, x, y) - - Defines a quadratic Bezier curve with a control point (\a cx, \a cy) and an - end point of (\a x, \a y). - */ - -/*! - \qmlmethod void QtQuick::JSPath::cubicTo(c1x, c1y, c2x, c2y, x, y) - - Defines a cubic Bezier curve with two control points (\a c1x, \a c1y) and - (\a c2x, \a c2y), and an end point of (\a x, \a y). - */ - -/*! - \qmlmethod void QtQuick::JSPath::arcTo(radiusX, radiusY, xAxisRotation, x, y, sweepFlag, largeArc) - - Defines an elliptical arc, following the elliptical arc command in SVG. See - \l{https://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands}{the - SVG path specification} for details on the parameters. - */ - -/*! - \qmlmethod void QtQuick::JSPath::clear() - - Clears the path object removing all path elements. This is more lightweight - than creating a new JSPath object. - */ - -void QQuickPathItemPathObject::clear() -{ - path = QQuickPathItemPath(); -} - -/*! - \qmltype StrokeFillParams - \inqmlmodule QtQuick - \ingroup qtquick-path - \brief Describes stroke and fill parameters via a JavaScript API - - The properties of StrokeFillParams objects correspond 1:1 to VisualPath - properties. The possible values for enumerations are the same as well, for - example: - - \code - sfp.strokeStyle = VisualPath.DashLine; - sfp.capStyle = VisualPath.RoundCap; - \endcode - */ - -/*! - \qmlproperty color QtQuick::StrokeFillParams::strokeColor - */ - -/*! - \qmlproperty real QtQuick::StrokeFillParams::strokeWidth - */ - -/*! - \qmlproperty color QtQuick::StrokeFillParams::fillColor - */ - -/*! - \qmlproperty enumeration QtQuick::StrokeFillParams::fillRule - */ - -/*! - \qmlproperty enumeration QtQuick::StrokeFillParams::joinStyle - */ - -/*! - \qmlproperty int QtQuick::StrokeFillParams::miterLimit - */ - -/*! - \qmlproperty enumeration QtQuick::StrokeFillParams::capStyle - */ - -/*! - \qmlproperty enumeration QtQuick::StrokeFillParams::strokeStyle - */ - -/*! - \qmlproperty real QtQuick::StrokeFillParams::dashOffset - */ - -/*! - \qmlproperty list<real> QtQuick::StrokeFillParams::dashPattern - - The dash pattern can be specified using JavaScript arrays. - - \code - sfp.dashPattern = [ 4, 2 ]; - \endcode - */ - -/*! - \qmlproperty object QtQuick::StrokeFillParams::fillGradient - - Sets the fill gradient. The default value is null. Gradients cannot be - created from JavaScript. Instead, reference a PathLinearGradient or other - item by id. - - \code - PathLinearGradient { id: grad; ... } - ... - sfp.fillGradient = grad; - \endcode - */ - -/*! - \qmlmethod void QtQuick::StrokeFillParams::clear() - - Resets all values to their defaults. This is more lightweight than creating - a new StrokeFillParams object. - */ - -void QQuickPathItemStrokeFillParamsObject::clear() -{ - sfp = QQuickPathItemStrokeFillParams(); - if (!v4fillGradient.isNullOrUndefined()) - v4fillGradient.set(v4fillGradient.engine(), nullptr); -} - -void QQuickPathItemStrokeFillParamsObject::setV4Engine(QV4::ExecutionEngine *engine) -{ - QQuickPathItemJSEngineData *ed = engineData(engine); - QV4::Scope scope(engine); - QV4::Scoped<QQuickPathItemJSStrokeFillParams> wrapper(scope, engine->memoryManager->allocObject<QQuickPathItemJSStrokeFillParams>()); - QV4::ScopedObject p(scope, ed->strokeFillParamsProto.value()); - wrapper->setPrototype(p); - wrapper->d()->obj = this; - m_v4value = wrapper; -} - -/*! - \qmlmethod JSPath QtQuick::PathItem::newPath() - - Creates and returns a new object that describes a path and offers a - JavaScript API. Paired with a stroke-fill parameter object it is - equivalent to a VisualPath. - - The following two snippets are equivalent when it comes to the end result: - - \code - var p = pathItem.newPath(); - var sfp = pathItem.newStrokeFillParams(); - sfp.fillColor = "white"; - sfp.strokeColor = "black"; - sfp.strokeWidth = 0.172; - p.moveTo(-122.304, 84.285); - p.cubicTo(-122.304, 84.285, -122.203, 86.179, -123.027, 86.16); - pathItem.appendVisualPath(p, sfp); - \endcode - - \code - PathItem { - VisualPath { - fillColor: "white" - strokeColor: "black" - strokeWidth: 0.172 - Path { - startX: -122.304; startY: 84.285 - PathCubic { control1X: -122.304; control1Y: 84.285; control2X: -122.203; control2Y: 86.179; x: -123.027; y: 86.16 } - } - } - } - \endcode - - The latter offers a full declarative API, with the possibility to binding - to and animating properties, while the former uses less resources due to - greatly reducing the number of QObject instances created. -*/ - -void QQuickPathItem::newPath(QQmlV4Function *args) -{ - QQuickPathItemPathObject *obj = new QQuickPathItemPathObject(this); - obj->setV4Engine(QQmlEnginePrivate::get(qmlEngine(this))->v4engine()); - args->setReturnValue(obj->v4value()); -} - -/*! - \qmlmethod StrokeFillParams QtQuick::PathItem::newStrokeFillParams() - - Creates and returns a new object that describes stroke and fill parameters - and offers a JavaScript API. Paired with a path object it is equivalent to - a VisualPath. - */ - -void QQuickPathItem::newStrokeFillParams(QQmlV4Function *args) -{ - QQuickPathItemStrokeFillParamsObject *obj = new QQuickPathItemStrokeFillParamsObject(this); - obj->setV4Engine(QQmlEnginePrivate::get(qmlEngine(this))->v4engine()); - args->setReturnValue(obj->v4value()); -} - -/*! - \qmlmethod void QtQuick::PathItem::clearVisualPaths() - - Clears the list of visual paths. - - \note This applies only to path and stroke-fill parameter objects registered - via appendVisualPaths(). - */ - -void QQuickPathItem::clearVisualPaths(QQmlV4Function *args) -{ - Q_UNUSED(args); - Q_D(QQuickPathItem); - d->jsData.paths.clear(); - d->jsData.sfp.clear(); -} - -/*! - \qmlmethod void QtQuick::PathItem::commitVisualPaths() - - Updates the PathItem. - - In order to avoid rendering a half-prepared PathItem, calling - PathItem.appendVisualPath() does not trigger any processing. Instead, - applications must call this function when all path and stroke-fill - parameter objects are registered. - */ - -void QQuickPathItem::commitVisualPaths(QQmlV4Function *args) -{ - Q_UNUSED(args); - Q_D(QQuickPathItem); - d->_q_visualPathChanged(); -} - -/*! - \qmlmethod void QtQuick::PathItem::appendVisualPath(object path, object strokeFillParams) - - Adds the visual path compoes of \a path and \a strokeFillParams into the - PathItem. - - \note The declarative and imprative (JavaScript) APIs of PathItem use - independent data structures. Calling this function has no effect on the - PathItem.elements property and vice versa. Once this function is called, - the PathItem will only consider the data registered via this function and - will ignore the declarative elements property. - */ - -void QQuickPathItem::appendVisualPath(QQmlV4Function *args) -{ - if (args->length() < 2) - return; - - Q_D(QQuickPathItem); - QV4::Scope scope(args->v4engine()); - QV4::Scoped<QQuickPathItemJSPath> jsp(scope, (*args)[0]); - QV4::Scoped<QQuickPathItemJSStrokeFillParams> jssfp(scope, (*args)[1]); - - const QQuickPathItemPath &path(jsp->d()->obj->path); - const QQuickPathItemStrokeFillParams &sfp(jssfp->d()->obj->sfp); - - d->jsData.paths.append(path); - d->jsData.sfp.append(sfp); -} - -QT_END_NAMESPACE - -#include "moc_qquickpathitem_p.cpp" diff --git a/src/imports/pathitem/plugin.cpp b/src/imports/shapes/plugin.cpp index 6b43e8f398..2f2f8c74d3 100644 --- a/src/imports/pathitem/plugin.cpp +++ b/src/imports/shapes/plugin.cpp @@ -40,32 +40,32 @@ #include <QtQml/qqmlextensionplugin.h> #include <QtQml/qqml.h> -#include "qquickpathitem_p.h" +#include "qquickshape_p.h" static void initResources() { #ifdef QT_STATIC - Q_INIT_RESOURCE(qmake_Qt_labs_pathitem); + Q_INIT_RESOURCE(qmake_QtQuick_Shapes); #endif } QT_BEGIN_NAMESPACE -class QmlPathItemPlugin : public QQmlExtensionPlugin +class QmlShapesPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid) public: - QmlPathItemPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } + QmlShapesPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { initResources(); } void registerTypes(const char *uri) Q_DECL_OVERRIDE { - Q_ASSERT(QByteArray(uri) == QByteArray("Qt.labs.pathitem")); - qmlRegisterType<QQuickPathItem>(uri, 1, 0, "PathItem"); - qmlRegisterType<QQuickVisualPath>(uri, 1, 0, "VisualPath"); - qmlRegisterType<QQuickPathGradientStop>(uri, 1, 0, "PathGradientStop"); - qmlRegisterUncreatableType<QQuickPathGradient>(uri, 1, 0, "PathGradient", QQuickPathGradient::tr("PathGradient is an abstract base class")); - qmlRegisterType<QQuickPathLinearGradient>(uri, 1, 0, "PathLinearGradient"); + Q_ASSERT(QByteArray(uri) == QByteArray("QtQuick.Shapes")); + qmlRegisterType<QQuickShape>(uri, 1, 0, "Shape"); + qmlRegisterType<QQuickShapePath>(uri, 1, 0, "ShapePath"); + qmlRegisterType<QQuickShapeGradientStop>(uri, 1, 0, "ShapeGradientStop"); + qmlRegisterUncreatableType<QQuickShapeGradient>(uri, 1, 0, "ShapeGradient", QQuickShapeGradient::tr("ShapeGradient is an abstract base class")); + qmlRegisterType<QQuickShapeLinearGradient>(uri, 1, 0, "ShapeLinearGradient"); } }; diff --git a/src/imports/pathitem/plugins.qmltypes b/src/imports/shapes/plugins.qmltypes index 03f26e243c..28d8dd1f12 100644 --- a/src/imports/pathitem/plugins.qmltypes +++ b/src/imports/shapes/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable -noforceqtquick Qt.labs.pathitem 1.0' +// 'qmlplugindump -nonrelocatable -noforceqtquick QtQuick.Shapes 1.0' Module { dependencies: [] @@ -173,10 +173,10 @@ Module { } } Component { - name: "QQuickPathGradient" + name: "QQuickShapeGradient" defaultProperty: "stops" prototype: "QObject" - exports: ["Qt.labs.pathitem/PathGradient 1.0"] + exports: ["QtQuick.Shapes/ShapeGradient 1.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { @@ -192,18 +192,18 @@ Module { Signal { name: "updated" } } Component { - name: "QQuickPathGradientStop" + name: "QQuickShapeGradientStop" prototype: "QObject" - exports: ["Qt.labs.pathitem/PathGradientStop 1.0"] + exports: ["QtQuick.Shapes/ShapeGradientStop 1.0"] exportMetaObjectRevisions: [0] Property { name: "position"; type: "double" } Property { name: "color"; type: "QColor" } } Component { - name: "QQuickPathItem" + name: "QQuickShape" defaultProperty: "elements" prototype: "QQuickItem" - exports: ["Qt.labs.pathitem/PathItem 1.0"] + exports: ["QtQuick.Shapes/Shape 1.0"] exportMetaObjectRevisions: [0] Enum { name: "RendererType" @@ -226,33 +226,13 @@ Module { Property { name: "asynchronous"; type: "bool" } Property { name: "enableVendorExtensions"; type: "bool" } Property { name: "status"; type: "Status"; isReadonly: true } - Property { name: "elements"; type: "QQuickVisualPath"; isList: true; isReadonly: true } - Method { - name: "newPath" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "newStrokeFillParams" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "clearVisualPaths" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "commitVisualPaths" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } - Method { - name: "appendVisualPath" - Parameter { name: "args"; type: "QQmlV4Function"; isPointer: true } - } + Property { name: "elements"; type: "QQuickShapePath"; isList: true; isReadonly: true } } Component { - name: "QQuickPathLinearGradient" + name: "QQuickShapeLinearGradient" defaultProperty: "stops" - prototype: "QQuickPathGradient" - exports: ["Qt.labs.pathitem/PathLinearGradient 1.0"] + prototype: "QQuickShapeGradient" + exports: ["QtQuick.Shapes/ShapeLinearGradient 1.0"] exportMetaObjectRevisions: [0] Property { name: "x1"; type: "double" } Property { name: "y1"; type: "double" } @@ -260,10 +240,10 @@ Module { Property { name: "y2"; type: "double" } } Component { - name: "QQuickVisualPath" + name: "QQuickShapePath" defaultProperty: "path" prototype: "QObject" - exports: ["Qt.labs.pathitem/VisualPath 1.0"] + exports: ["QtQuick.Shapes/ShapePath 1.0"] exportMetaObjectRevisions: [0] Enum { name: "FillRule" @@ -306,7 +286,7 @@ Module { Property { name: "strokeStyle"; type: "StrokeStyle" } Property { name: "dashOffset"; type: "double" } Property { name: "dashPattern"; type: "QVector<qreal>" } - Property { name: "fillGradient"; type: "QQuickPathGradient"; isPointer: true } + Property { name: "fillGradient"; type: "QQuickShapeGradient"; isPointer: true } Signal { name: "changed" } } } diff --git a/src/imports/shapes/qmldir b/src/imports/shapes/qmldir new file mode 100644 index 0000000000..306ad1ecd7 --- /dev/null +++ b/src/imports/shapes/qmldir @@ -0,0 +1,4 @@ +module QtQuick.Shapes +plugin qmlshapesplugin +classname QmlShapesPlugin +typeinfo plugins.qmltypes diff --git a/src/imports/pathitem/qquicknvprfunctions.cpp b/src/imports/shapes/qquicknvprfunctions.cpp index 40eb2bb932..e9b93cf4a1 100644 --- a/src/imports/pathitem/qquicknvprfunctions.cpp +++ b/src/imports/shapes/qquicknvprfunctions.cpp @@ -231,9 +231,6 @@ bool QQuickNvprFunctionsPrivate::resolve() q->stencilFillPathInstanced = PROC(PFNGLSTENCILFILLPATHINSTANCEDNVPROC, glStencilFillPathInstancedNV); q->stencilStrokePathInstanced = PROC(PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC, glStencilStrokePathInstancedNV); q->pathCoverDepthFunc = PROC(PFNGLPATHCOVERDEPTHFUNCNVPROC, glPathCoverDepthFuncNV); - q->pathColorGen = PROC(PFNGLPATHCOLORGENNVPROC, glPathColorGenNV); - q->pathTexGen = PROC(PFNGLPATHTEXGENNVPROC, glPathTexGenNV); - q->pathFogGen = PROC(PFNGLPATHFOGGENNVPROC, glPathFogGenNV); q->coverFillPath = PROC(PFNGLCOVERFILLPATHNVPROC, glCoverFillPathNV); q->coverStrokePath = PROC(PFNGLCOVERSTROKEPATHNVPROC, glCoverStrokePathNV); q->coverFillPathInstanced = PROC(PFNGLCOVERFILLPATHINSTANCEDNVPROC, glCoverFillPathInstancedNV); @@ -246,10 +243,6 @@ bool QQuickNvprFunctionsPrivate::resolve() q->getPathMetrics = PROC(PFNGLGETPATHMETRICSNVPROC, glGetPathMetricsNV); q->getPathMetricRange = PROC(PFNGLGETPATHMETRICRANGENVPROC, glGetPathMetricRangeNV); q->getPathSpacing = PROC(PFNGLGETPATHSPACINGNVPROC, glGetPathSpacingNV); - q->getPathColorgeniv = PROC(PFNGLGETPATHCOLORGENIVNVPROC, glGetPathColorGenivNV); - q->getPathColorgenfv = PROC(PFNGLGETPATHCOLORGENFVNVPROC, glGetPathColorGenfvNV); - q->getPathTexGeniv = PROC(PFNGLGETPATHTEXGENIVNVPROC, glGetPathTexGenivNV); - q->getPathTexGenfv = PROC(PFNGLGETPATHTEXGENFVNVPROC, glGetPathTexGenfvNV); q->isPointInFillPath = PROC(PFNGLISPOINTINFILLPATHNVPROC, glIsPointInFillPathNV); q->isPointInStrokePath = PROC(PFNGLISPOINTINSTROKEPATHNVPROC, glIsPointInStrokePathNV); q->getPathLength = PROC(PFNGLGETPATHLENGTHNVPROC, glGetPathLengthNV); diff --git a/src/imports/pathitem/qquicknvprfunctions_p.h b/src/imports/shapes/qquicknvprfunctions_p.h index 7900388305..dd45dd7daa 100644 --- a/src/imports/pathitem/qquicknvprfunctions_p.h +++ b/src/imports/shapes/qquicknvprfunctions_p.h @@ -58,6 +58,9 @@ QT_BEGIN_NAMESPACE +// note: fixed pipeline specific functions are removed - modern ES ext +// headers have all this, but not the fixed stuff + #ifndef GL_NV_path_rendering #define GL_PATH_FORMAT_SVG_NV 0x9070 #define GL_PATH_FORMAT_PS_NV 0x9071 @@ -249,9 +252,6 @@ typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLi typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues); typedef void (QOPENGLF_APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues); typedef void (QOPENGLF_APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func); -typedef void (QOPENGLF_APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs); -typedef void (QOPENGLF_APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs); -typedef void (QOPENGLF_APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode); typedef void (QOPENGLF_APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode); typedef void (QOPENGLF_APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode); typedef void (QOPENGLF_APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues); @@ -264,10 +264,6 @@ typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfl typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics); typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics); typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing); -typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value); -typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value); -typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value); -typedef void (QOPENGLF_APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value); typedef GLboolean (QOPENGLF_APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); typedef GLboolean (QOPENGLF_APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y); typedef GLfloat (QOPENGLF_APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); @@ -297,6 +293,11 @@ typedef void (QOPENGLF_APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint progra #define GL_INVERT 0x150A #endif +// this one originates from fixed pipeline so may not be in GLES ext headers, but we need it still +#ifndef GL_OBJECT_LINEAR_NV +#define GL_OBJECT_LINEAR_NV 0x2401 +#endif + #ifndef GL_EXT_direct_state_access typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOADFEXTPROC) (GLenum mode, const GLfloat *m); typedef void (QOPENGLF_APIENTRYP PFNGLMATRIXLOADIDENTITYEXTPROC) (GLenum mode); @@ -353,9 +354,6 @@ public: PFNGLSTENCILFILLPATHINSTANCEDNVPROC stencilFillPathInstanced = nullptr; PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC stencilStrokePathInstanced = nullptr; PFNGLPATHCOVERDEPTHFUNCNVPROC pathCoverDepthFunc = nullptr; - PFNGLPATHCOLORGENNVPROC pathColorGen = nullptr; - PFNGLPATHTEXGENNVPROC pathTexGen = nullptr; - PFNGLPATHFOGGENNVPROC pathFogGen = nullptr; PFNGLCOVERFILLPATHNVPROC coverFillPath = nullptr; PFNGLCOVERSTROKEPATHNVPROC coverStrokePath = nullptr; PFNGLCOVERFILLPATHINSTANCEDNVPROC coverFillPathInstanced = nullptr; @@ -368,10 +366,6 @@ public: PFNGLGETPATHMETRICSNVPROC getPathMetrics = nullptr; PFNGLGETPATHMETRICRANGENVPROC getPathMetricRange = nullptr; PFNGLGETPATHSPACINGNVPROC getPathSpacing = nullptr; - PFNGLGETPATHCOLORGENIVNVPROC getPathColorgeniv = nullptr; - PFNGLGETPATHCOLORGENFVNVPROC getPathColorgenfv = nullptr; - PFNGLGETPATHTEXGENIVNVPROC getPathTexGeniv = nullptr; - PFNGLGETPATHTEXGENFVNVPROC getPathTexGenfv = nullptr; PFNGLISPOINTINFILLPATHNVPROC isPointInFillPath = nullptr; PFNGLISPOINTINSTROKEPATHNVPROC isPointInStrokePath = nullptr; PFNGLGETPATHLENGTHNVPROC getPathLength = nullptr; diff --git a/src/imports/pathitem/qquicknvprfunctions_p_p.h b/src/imports/shapes/qquicknvprfunctions_p_p.h index 6df20566af..6df20566af 100644 --- a/src/imports/pathitem/qquicknvprfunctions_p_p.h +++ b/src/imports/shapes/qquicknvprfunctions_p_p.h diff --git a/src/imports/shapes/qquickshape.cpp b/src/imports/shapes/qquickshape.cpp new file mode 100644 index 0000000000..e37addba07 --- /dev/null +++ b/src/imports/shapes/qquickshape.cpp @@ -0,0 +1,1485 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtQuick module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qquickshape_p.h" +#include "qquickshape_p_p.h" +#include "qquickshapegenericrenderer_p.h" +#include "qquickshapenvprrenderer_p.h" +#include "qquickshapesoftwarerenderer_p.h" +#include <private/qsgtexture_p.h> +#include <private/qquicksvgparser_p.h> +#include <QtGui/private/qdrawhelper_p.h> +#include <QOpenGLFunctions> + +#include <private/qv4engine_p.h> +#include <private/qv4object_p.h> +#include <private/qv4qobjectwrapper_p.h> +#include <private/qv4mm_p.h> +#include <private/qqmlengine_p.h> + +QT_BEGIN_NAMESPACE + +/*! + \qmlmodule QtQuick.Shapes 1.0 + \title Qt Quick Shapes QML Types + \ingroup qmlmodules + \brief Provides QML types for drawing stroked and filled shapes + + To use the types in this module, import the module with the following line: + + \code + import QtQuick.Shapes 1.0 + \endcode +*/ + +QQuickShapeStrokeFillParams::QQuickShapeStrokeFillParams() + : strokeColor(Qt::white), + strokeWidth(1), + fillColor(Qt::white), + fillRule(QQuickShapePath::OddEvenFill), + joinStyle(QQuickShapePath::BevelJoin), + miterLimit(2), + capStyle(QQuickShapePath::SquareCap), + strokeStyle(QQuickShapePath::SolidLine), + dashOffset(0), + fillGradient(nullptr) +{ + dashPattern << 4 << 2; // 4 * strokeWidth dash followed by 2 * strokeWidth space +} + +QPainterPath QQuickShapePathCommands::toPainterPath() const +{ + QPainterPath p; + int coordIdx = 0; + for (int i = 0; i < cmd.count(); ++i) { + switch (cmd[i]) { + case QQuickShapePathCommands::MoveTo: + p.moveTo(coords[coordIdx], coords[coordIdx + 1]); + coordIdx += 2; + break; + case QQuickShapePathCommands::LineTo: + p.lineTo(coords[coordIdx], coords[coordIdx + 1]); + coordIdx += 2; + break; + case QQuickShapePathCommands::QuadTo: + p.quadTo(coords[coordIdx], coords[coordIdx + 1], + coords[coordIdx + 2], coords[coordIdx + 3]); + coordIdx += 4; + break; + case QQuickShapePathCommands::CubicTo: + p.cubicTo(coords[coordIdx], coords[coordIdx + 1], + coords[coordIdx + 2], coords[coordIdx + 3], + coords[coordIdx + 4], coords[coordIdx + 5]); + coordIdx += 6; + break; + case QQuickShapePathCommands::ArcTo: + // does not map to the QPainterPath API; reuse the helper code from QQuickSvgParser + QQuickSvgParser::pathArc(p, + coords[coordIdx], coords[coordIdx + 1], // radius + coords[coordIdx + 2], // xAxisRotation + !qFuzzyIsNull(coords[coordIdx + 6]), // useLargeArc + !qFuzzyIsNull(coords[coordIdx + 5]), // sweep flag + coords[coordIdx + 3], coords[coordIdx + 4], // end + p.currentPosition().x(), p.currentPosition().y()); + coordIdx += 7; + break; + default: + qWarning("Unknown JS path command: %d", cmd[i]); + break; + } + } + return p; +} + +/*! + \qmltype ShapePath + \instantiates QQuickShapePath + \inqmlmodule QtQuick.Shapes + \ingroup qtquick-paths + \ingroup qtquick-views + \inherits Object + \brief Describes a Path and associated properties for stroking and filling + \since 5.10 + + A Shape contains one or more ShapePath elements. At least one + ShapePath is necessary in order to have a Shape output anything + visible. A ShapeItem in turn contains a Path and properties describing the + stroking and filling parameters, such as the stroke width and color, the + fill color or gradient, join and cap styles, and so on. Finally, the Path + object contains a list of path elements like PathMove, PathLine, PathCubic, + PathQuad, PathArc. + + Any property changes in these data sets will be bubble up and change the + output of the Shape. This means that it is simple and easy to change, or + even animate, the starting and ending position, control points, or any + stroke or fill parameters using the usual QML bindings and animation types + like NumberAnimation. + + In the following example the line join style changes automatically based on + the value of joinStyleIndex: + + \code + ShapePath { + strokeColor: "black" + strokeWidth: 16 + fillColor: "transparent" + capStyle: ShapePath.RoundCap + + property int joinStyleIndex: 0 + property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ] + + joinStyle: styles[joinStyleIndex] + + Path { + startX: 30 + startY: 30 + PathLine { x: 100; y: 100 } + PathLine { x: 30; y: 100 } + } + } + \endcode + + Once associated with a Shape, here is the output with a joinStyleIndex + of 2 (ShapePath.RoundJoin): + + \image visualpath-code-example.png + */ + +QQuickShapePathPrivate::QQuickShapePathPrivate() + : path(nullptr), + dirty(DirtyAll) +{ +} + +QQuickShapePath::QQuickShapePath(QObject *parent) + : QObject(*(new QQuickShapePathPrivate), parent) +{ +} + +QQuickShapePath::~QQuickShapePath() +{ +} + +/*! + \qmlproperty Path QtQuick.Shapes::ShapePath::path + + This property holds the Path object. + + \default + */ + +QQuickPath *QQuickShapePath::path() const +{ + Q_D(const QQuickShapePath); + return d->path; +} + +void QQuickShapePath::setPath(QQuickPath *path) +{ + Q_D(QQuickShapePath); + if (d->path == path) + return; + + if (d->path) + qmlobject_disconnect(d->path, QQuickPath, SIGNAL(changed()), + this, QQuickShapePath, SLOT(_q_pathChanged())); + d->path = path; + qmlobject_connect(d->path, QQuickPath, SIGNAL(changed()), + this, QQuickShapePath, SLOT(_q_pathChanged())); + + d->dirty |= QQuickShapePathPrivate::DirtyPath; + emit pathChanged(); + emit changed(); +} + +void QQuickShapePathPrivate::_q_pathChanged() +{ + Q_Q(QQuickShapePath); + dirty |= DirtyPath; + emit q->changed(); +} + +/*! + \qmlproperty color QtQuick.Shapes::ShapePath::strokeColor + + This property holds the stroking color. + + When set to \c transparent, no stroking occurs. + + The default value is \c white. + */ + +QColor QQuickShapePath::strokeColor() const +{ + Q_D(const QQuickShapePath); + return d->sfp.strokeColor; +} + +void QQuickShapePath::setStrokeColor(const QColor &color) +{ + Q_D(QQuickShapePath); + if (d->sfp.strokeColor != color) { + d->sfp.strokeColor = color; + d->dirty |= QQuickShapePathPrivate::DirtyStrokeColor; + emit strokeColorChanged(); + emit changed(); + } +} + +/*! + \qmlproperty color QtQuick.Shapes::ShapePath::strokeWidth + + This property holds the stroke width. + + When set to a negative value, no stroking occurs. + + The default value is 1. + */ + +qreal QQuickShapePath::strokeWidth() const +{ + Q_D(const QQuickShapePath); + return d->sfp.strokeWidth; +} + +void QQuickShapePath::setStrokeWidth(qreal w) +{ + Q_D(QQuickShapePath); + if (d->sfp.strokeWidth != w) { + d->sfp.strokeWidth = w; + d->dirty |= QQuickShapePathPrivate::DirtyStrokeWidth; + emit strokeWidthChanged(); + emit changed(); + } +} + +/*! + \qmlproperty color QtQuick.Shapes::ShapePath::fillColor + + This property holds the fill color. + + When set to \c transparent, no filling occurs. + + The default value is \c white. + */ + +QColor QQuickShapePath::fillColor() const +{ + Q_D(const QQuickShapePath); + return d->sfp.fillColor; +} + +void QQuickShapePath::setFillColor(const QColor &color) +{ + Q_D(QQuickShapePath); + if (d->sfp.fillColor != color) { + d->sfp.fillColor = color; + d->dirty |= QQuickShapePathPrivate::DirtyFillColor; + emit fillColorChanged(); + emit changed(); + } +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::ShapePath::fillRule + + This property holds the fill rule. The default value is + ShapePath.OddEvenFill. For an example on fill rules, see + QPainterPath::setFillRule(). + + \list + \li ShapePath.OddEvenFill + \li ShapePath.WindingFill + \endlist + */ + +QQuickShapePath::FillRule QQuickShapePath::fillRule() const +{ + Q_D(const QQuickShapePath); + return d->sfp.fillRule; +} + +void QQuickShapePath::setFillRule(FillRule fillRule) +{ + Q_D(QQuickShapePath); + if (d->sfp.fillRule != fillRule) { + d->sfp.fillRule = fillRule; + d->dirty |= QQuickShapePathPrivate::DirtyFillRule; + emit fillRuleChanged(); + emit changed(); + } +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::ShapePath::joinStyle + + This property defines how joins between two connected lines are drawn. The + default value is ShapePath.BevelJoin. + + \list + \li ShapePath.MiterJoin - The outer edges of the lines are extended to meet at an angle, and this area is filled. + \li ShapePath.BevelJoin - The triangular notch between the two lines is filled. + \li ShapePath.RoundJoin - A circular arc between the two lines is filled. + \endlist + */ + +QQuickShapePath::JoinStyle QQuickShapePath::joinStyle() const +{ + Q_D(const QQuickShapePath); + return d->sfp.joinStyle; +} + +void QQuickShapePath::setJoinStyle(JoinStyle style) +{ + Q_D(QQuickShapePath); + if (d->sfp.joinStyle != style) { + d->sfp.joinStyle = style; + d->dirty |= QQuickShapePathPrivate::DirtyStyle; + emit joinStyleChanged(); + emit changed(); + } +} + +/*! + \qmlproperty int QtQuick.Shapes::ShapePath::miterLimit + + When ShapePath.joinStyle is set to ShapePath.MiterJoin, this property + specifies how far the miter join can extend from the join point. + + The default value is 2. + */ + +int QQuickShapePath::miterLimit() const +{ + Q_D(const QQuickShapePath); + return d->sfp.miterLimit; +} + +void QQuickShapePath::setMiterLimit(int limit) +{ + Q_D(QQuickShapePath); + if (d->sfp.miterLimit != limit) { + d->sfp.miterLimit = limit; + d->dirty |= QQuickShapePathPrivate::DirtyStyle; + emit miterLimitChanged(); + emit changed(); + } +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::ShapePath::capStyle + + This property defines how the end points of lines are drawn. The + default value is ShapePath.SquareCap. + + \list + \li ShapePath.FlatCap - A square line end that does not cover the end point of the line. + \li ShapePath.SquareCap - A square line end that covers the end point and extends beyond it by half the line width. + \li ShapePath.RoundCap - A rounded line end. + \endlist + */ + +QQuickShapePath::CapStyle QQuickShapePath::capStyle() const +{ + Q_D(const QQuickShapePath); + return d->sfp.capStyle; +} + +void QQuickShapePath::setCapStyle(CapStyle style) +{ + Q_D(QQuickShapePath); + if (d->sfp.capStyle != style) { + d->sfp.capStyle = style; + d->dirty |= QQuickShapePathPrivate::DirtyStyle; + emit capStyleChanged(); + emit changed(); + } +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::ShapePath::strokeStyle + + This property defines the style of stroking. The default value is + ShapePath.SolidLine. + + \list + \li ShapePath.SolidLine - A plain line. + \li ShapePath.DashLine - Dashes separated by a few pixels. + \endlist + */ + +QQuickShapePath::StrokeStyle QQuickShapePath::strokeStyle() const +{ + Q_D(const QQuickShapePath); + return d->sfp.strokeStyle; +} + +void QQuickShapePath::setStrokeStyle(StrokeStyle style) +{ + Q_D(QQuickShapePath); + if (d->sfp.strokeStyle != style) { + d->sfp.strokeStyle = style; + d->dirty |= QQuickShapePathPrivate::DirtyDash; + emit strokeStyleChanged(); + emit changed(); + } +} + +/*! + \qmlproperty real QtQuick.Shapes::ShapePath::dashOffset + + This property defines the starting point on the dash pattern, measured in + units used to specify the dash pattern. + + The default value is 0. + + \sa QPen::setDashOffset() + */ + +qreal QQuickShapePath::dashOffset() const +{ + Q_D(const QQuickShapePath); + return d->sfp.dashOffset; +} + +void QQuickShapePath::setDashOffset(qreal offset) +{ + Q_D(QQuickShapePath); + if (d->sfp.dashOffset != offset) { + d->sfp.dashOffset = offset; + d->dirty |= QQuickShapePathPrivate::DirtyDash; + emit dashOffsetChanged(); + emit changed(); + } +} + +/*! + \qmlproperty list<real> QtQuick.Shapes::ShapePath::dashPattern + + This property defines the dash pattern when ShapePath.strokeStyle is set + to ShapePath.DashLine. The pattern must be specified as an even number of + positive entries where the entries 1, 3, 5... are the dashes and 2, 4, 6... + are the spaces. The pattern is specified in units of the pen's width. + + The default value is (4, 2), meaning a dash of 4 * ShapePath.strokeWidth + pixels followed by a space of 2 * ShapePath.strokeWidth pixels. + + \sa QPen::setDashPattern() + */ + +QVector<qreal> QQuickShapePath::dashPattern() const +{ + Q_D(const QQuickShapePath); + return d->sfp.dashPattern; +} + +void QQuickShapePath::setDashPattern(const QVector<qreal> &array) +{ + Q_D(QQuickShapePath); + if (d->sfp.dashPattern != array) { + d->sfp.dashPattern = array; + d->dirty |= QQuickShapePathPrivate::DirtyDash; + emit dashPatternChanged(); + emit changed(); + } +} + +/*! + \qmlproperty ShapeGradient QtQuick.Shapes::ShapePath::fillGradient + + This property defines the fill gradient. By default no gradient is enabled + and the value is \c null. In this case the fill uses a solid color based on + the value of ShapePath.fillColor. + + When set, ShapePath.fillColor is ignored and filling is done using one of + the ShapeGradient subtypes. + */ + +QQuickShapeGradient *QQuickShapePath::fillGradient() const +{ + Q_D(const QQuickShapePath); + return d->sfp.fillGradient; +} + +void QQuickShapePath::setFillGradient(QQuickShapeGradient *gradient) +{ + Q_D(QQuickShapePath); + if (d->sfp.fillGradient != gradient) { + if (d->sfp.fillGradient) + qmlobject_disconnect(d->sfp.fillGradient, QQuickShapeGradient, SIGNAL(updated()), + this, QQuickShapePath, SLOT(_q_fillGradientChanged())); + d->sfp.fillGradient = gradient; + if (d->sfp.fillGradient) + qmlobject_connect(d->sfp.fillGradient, QQuickShapeGradient, SIGNAL(updated()), + this, QQuickShapePath, SLOT(_q_fillGradientChanged())); + d->dirty |= QQuickShapePathPrivate::DirtyFillGradient; + emit changed(); + } +} + +void QQuickShapePathPrivate::_q_fillGradientChanged() +{ + Q_Q(QQuickShapePath); + dirty |= DirtyFillGradient; + emit q->changed(); +} + +void QQuickShapePath::resetFillGradient() +{ + setFillGradient(nullptr); +} + +/*! + \qmltype Shape + \instantiates QQuickShape + \inqmlmodule QtQuick.Shapes + \ingroup qtquick-paths + \ingroup qtquick-views + \inherits Item + \brief Renders a path + \since 5.10 + + Renders a path either by generating geometry via QPainterPath and manual + triangulation or by using a GPU vendor extension like \c{GL_NV_path_rendering}. + + This approach is different from rendering shapes via QQuickPaintedItem or + the 2D Canvas because the path never gets rasterized in software. Therefore + Shape is suitable for creating shapes spreading over larger areas of the + screen, avoiding the performance penalty for texture uploads or framebuffer + blits. In addition, the declarative API allows manipulating, binding to, + and even animating the path element properties like starting and ending + position, the control points, etc. + + The types for specifying path elements are shared between \l PathView and + Shape. However, not all Shape implementations support all path + element types, while some may not make sense for PathView. Shape's + currently supported subset is: PathMove, PathLine, PathQuad, PathCubic, + PathArc, PathSvg. + + See \l Path for a detailed overview of the supported path elements. + + \code + Shape { + width: 200 + height: 150 + anchors.centerIn: parent + ShapePath { + strokeWidth: 4 + strokeColor: "red" + fillGradient: ShapeLinearGradient { + x1: 20; y1: 20 + x2: 180; y2: 130 + ShapeGradientStop { position: 0; color: "blue" } + ShapeGradientStop { position: 0.2; color: "green" } + ShapeGradientStop { position: 0.4; color: "red" } + ShapeGradientStop { position: 0.6; color: "yellow" } + ShapeGradientStop { position: 1; color: "cyan" } + } + strokeStyle: ShapePath.DashLine + dashPattern: [ 1, 4 ] + Path { + startX: 20; startY: 20 + PathLine { x: 180; y: 130 } + PathLine { x: 20; y: 130 } + PathLine { x: 20; y: 20 } + } + } + } + \endcode + + \image pathitem-code-example.png + + \note It is important to be aware of performance implications, in particular + when the application is running on the generic Shape implementation due to + not having support for accelerated path rendering. The geometry generation + happens entirely on the CPU in this case, and this is potentially + expensive. Changing the set of path elements, changing the properties of + these elements, or changing certain properties of the Shape itself all lead + to retriangulation of the affected elements on every change. Therefore, + applying animation to such properties can affect performance on less + powerful systems. If animating properties other than stroke and fill colors + is a must, it is recommended to target systems providing + \c{GL_NV_path_rendering} where the cost of path property changes is much + smaller. + + \note However, the data-driven, declarative nature of the Shape API often + means better cacheability for the underlying CPU and GPU resources. A + property change in one ShapePath will only lead to reprocessing the affected + ShapePath, leaving other parts of the Shape unchanged. Therefore, a heavily + changing (for example, animating) property can often result in a lower + overall system load than with imperative painting approaches (for example, + QPainter). + + The following list summarizes the available Shape rendering approaches: + + \list + + \li When running with the default, OpenGL backend of Qt Quick, both the + generic, triangulation-based and the NVIDIA-specific + \c{GL_NV_path_rendering} methods are available. The choice is made at + runtime, depending on the graphics driver's capabilities. When this is not + desired, applications can force using the generic method by setting the + Shape.enableVendorExtensions property to \c false. + + \li The \c software backend is fully supported. The path is rendered via + QPainter::strokePath() and QPainter::fillPath() in this case. + + \li The Direct 3D 12 backend is not currently supported. + + \li The OpenVG backend is not currently supported. + + \endlist + + \sa Path, PathMove, PathLine, PathQuad, PathCubic, PathArc, PathSvg +*/ + +QQuickShapePrivate::QQuickShapePrivate() + : componentComplete(true), + spChanged(false), + rendererType(QQuickShape::UnknownRenderer), + async(false), + status(QQuickShape::Null), + renderer(nullptr), + enableVendorExts(true) +{ +} + +QQuickShapePrivate::~QQuickShapePrivate() +{ + delete renderer; +} + +void QQuickShapePrivate::_q_shapePathChanged() +{ + Q_Q(QQuickShape); + spChanged = true; + q->polish(); +} + +void QQuickShapePrivate::setStatus(QQuickShape::Status newStatus) +{ + Q_Q(QQuickShape); + if (status != newStatus) { + status = newStatus; + emit q->statusChanged(); + } +} + +QQuickShape::QQuickShape(QQuickItem *parent) + : QQuickItem(*(new QQuickShapePrivate), parent) +{ + setFlag(ItemHasContents); +} + +QQuickShape::~QQuickShape() +{ +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::Shape::rendererType + + This property determines which path rendering backend is active. + + \list + + \li Shape.UnknownRenderer - The renderer is unknown. + + \li Shape.GeometryRenderer - The generic, driver independent solution + for OpenGL. Uses the same CPU-based triangulation approach as QPainter's + OpenGL 2 paint engine. This is the default on non-NVIDIA hardware when the + default, OpenGL Qt Quick scenegraph backend is in use. + + \li Shape.NvprRenderer - Path items are rendered by performing OpenGL + calls using the \c{GL_NV_path_rendering} extension. This is the default on + NVIDIA hardware when the default, OpenGL Qt Quick scenegraph backend is in + use. + + \li Shape.SoftwareRenderer - Pure QPainter drawing using the raster + paint engine. This is the default, and only, option when the Qt Quick + scenegraph is running with the \c software backend. + + \endlist +*/ + +QQuickShape::RendererType QQuickShape::rendererType() const +{ + Q_D(const QQuickShape); + return d->rendererType; +} + +/*! + \qmlproperty bool QtQuick.Shapes::Shape::asynchronous + + When Shape.rendererType is Shape.GeometryRenderer, the input path is + triangulated on the CPU during the polishing phase of the Shape. This is + potentially expensive. To offload this work to separate worker threads, set + this property to \c true. + + When enabled, making a Shape visible will not wait for the content to + become available. Instead, the gui/main thread is not blocked and the + results of the path rendering are shown only when all the asynchronous work + has been finished. + + The default value is \c false. + */ + +bool QQuickShape::asynchronous() const +{ + Q_D(const QQuickShape); + return d->async; +} + +void QQuickShape::setAsynchronous(bool async) +{ + Q_D(QQuickShape); + if (d->async != async) { + d->async = async; + emit asynchronousChanged(); + if (d->componentComplete) + d->_q_shapePathChanged(); + } +} + +/*! + \qmlproperty bool QtQuick.Shapes::Shape::enableVendorExtensions + + This property controls the usage of non-standard OpenGL extensions like + GL_NV_path_rendering. To disable Shape.NvprRenderer and force a uniform + behavior regardless of the graphics card and drivers, set this property to + \c false. + + The default value is \c true. + */ + +bool QQuickShape::enableVendorExtensions() const +{ + Q_D(const QQuickShape); + return d->enableVendorExts; +} + +void QQuickShape::setEnableVendorExtensions(bool enable) +{ + Q_D(QQuickShape); + if (d->enableVendorExts != enable) { + d->enableVendorExts = enable; + emit enableVendorExtensionsChanged(); + } +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::Shape::status + + This property determines the status of the Shape and is relevant when + Shape.asynchronous is set to \c true. + + \list + + \li Shape.Null - Not yet initialized. + + \li Shape.Ready - The Shape has finished processing. + + \li Shape.Processing - The path is being processed. + + \endlist + */ + +QQuickShape::Status QQuickShape::status() const +{ + Q_D(const QQuickShape); + return d->status; +} + +static QQuickShapePath *vpe_at(QQmlListProperty<QQuickShapePath> *property, int index) +{ + QQuickShapePrivate *d = QQuickShapePrivate::get(static_cast<QQuickShape *>(property->object)); + return d->qmlData.sp.at(index); +} + +static void vpe_append(QQmlListProperty<QQuickShapePath> *property, QQuickShapePath *obj) +{ + QQuickShape *item = static_cast<QQuickShape *>(property->object); + QQuickShapePrivate *d = QQuickShapePrivate::get(item); + d->qmlData.sp.append(obj); + + if (d->componentComplete) { + QObject::connect(obj, SIGNAL(changed()), item, SLOT(_q_shapePathChanged())); + d->_q_shapePathChanged(); + } +} + +static int vpe_count(QQmlListProperty<QQuickShapePath> *property) +{ + QQuickShapePrivate *d = QQuickShapePrivate::get(static_cast<QQuickShape *>(property->object)); + return d->qmlData.sp.count(); +} + +static void vpe_clear(QQmlListProperty<QQuickShapePath> *property) +{ + QQuickShape *item = static_cast<QQuickShape *>(property->object); + QQuickShapePrivate *d = QQuickShapePrivate::get(item); + + for (QQuickShapePath *p : d->qmlData.sp) + QObject::disconnect(p, SIGNAL(changed()), item, SLOT(_q_shapePathChanged())); + + d->qmlData.sp.clear(); + + if (d->componentComplete) + d->_q_shapePathChanged(); +} + +/*! + \qmlproperty list<ShapePath> QtQuick.Shapes::Shape::elements + + This property holds the ShapePath objects that define the contents of the + Shape. + + \default + */ + +QQmlListProperty<QQuickShapePath> QQuickShape::elements() +{ + return QQmlListProperty<QQuickShapePath>(this, + nullptr, + vpe_append, + vpe_count, + vpe_at, + vpe_clear); +} + +void QQuickShape::classBegin() +{ + Q_D(QQuickShape); + d->componentComplete = false; +} + +void QQuickShape::componentComplete() +{ + Q_D(QQuickShape); + d->componentComplete = true; + + for (QQuickShapePath *p : d->qmlData.sp) + connect(p, SIGNAL(changed()), this, SLOT(_q_shapePathChanged())); + + d->_q_shapePathChanged(); +} + +void QQuickShape::updatePolish() +{ + Q_D(QQuickShape); + + if (!d->spChanged) + return; + + d->spChanged = false; + + if (!d->renderer) { + d->createRenderer(); + if (!d->renderer) + return; + emit rendererChanged(); + } + + // endSync() is where expensive calculations may happen (or get kicked off + // on worker threads), depending on the backend. Therefore do this only + // when the item is visible. + if (isVisible()) + d->sync(); + + update(); +} + +void QQuickShape::itemChange(ItemChange change, const ItemChangeData &data) +{ + Q_D(QQuickShape); + + // sync may have been deferred; do it now if the item became visible + if (change == ItemVisibleHasChanged && data.boolValue) + d->_q_shapePathChanged(); + + QQuickItem::itemChange(change, data); +} + +QSGNode *QQuickShape::updatePaintNode(QSGNode *node, UpdatePaintNodeData *) +{ + // Called on the render thread, with the gui thread blocked. We can now + // safely access gui thread data. + + Q_D(QQuickShape); + if (d->renderer) { + if (!node) + node = d->createNode(); + d->renderer->updateNode(); + } + return node; +} + +// the renderer object lives on the gui thread +void QQuickShapePrivate::createRenderer() +{ + Q_Q(QQuickShape); + QSGRendererInterface *ri = q->window()->rendererInterface(); + if (!ri) + return; + + switch (ri->graphicsApi()) { +#ifndef QT_NO_OPENGL + case QSGRendererInterface::OpenGL: + if (enableVendorExts && QQuickShapeNvprRenderNode::isSupported()) { + rendererType = QQuickShape::NvprRenderer; + renderer = new QQuickShapeNvprRenderer; + } else { + rendererType = QQuickShape::GeometryRenderer; + renderer = new QQuickShapeGenericRenderer(q); + } + break; +#endif + case QSGRendererInterface::Software: + rendererType = QQuickShape::SoftwareRenderer; + renderer = new QQuickShapeSoftwareRenderer; + break; + default: + qWarning("No path backend for this graphics API yet"); + break; + } +} + +// the node lives on the render thread +QSGNode *QQuickShapePrivate::createNode() +{ + Q_Q(QQuickShape); + QSGNode *node = nullptr; + if (!q->window()) + return node; + QSGRendererInterface *ri = q->window()->rendererInterface(); + if (!ri) + return node; + + switch (ri->graphicsApi()) { +#ifndef QT_NO_OPENGL + case QSGRendererInterface::OpenGL: + if (enableVendorExts && QQuickShapeNvprRenderNode::isSupported()) { + node = new QQuickShapeNvprRenderNode; + static_cast<QQuickShapeNvprRenderer *>(renderer)->setNode( + static_cast<QQuickShapeNvprRenderNode *>(node)); + } else { + node = new QQuickShapeGenericNode; + static_cast<QQuickShapeGenericRenderer *>(renderer)->setRootNode( + static_cast<QQuickShapeGenericNode *>(node)); + } + break; +#endif + case QSGRendererInterface::Software: + node = new QQuickShapeSoftwareRenderNode(q); + static_cast<QQuickShapeSoftwareRenderer *>(renderer)->setNode( + static_cast<QQuickShapeSoftwareRenderNode *>(node)); + break; + default: + qWarning("No path backend for this graphics API yet"); + break; + } + + return node; +} + +static void q_asyncShapeReady(void *data) +{ + QQuickShapePrivate *self = static_cast<QQuickShapePrivate *>(data); + self->setStatus(QQuickShape::Ready); +} + +void QQuickShapePrivate::sync() +{ + const bool useAsync = async && renderer->flags().testFlag(QQuickAbstractPathRenderer::SupportsAsync); + if (useAsync) { + setStatus(QQuickShape::Processing); + renderer->setAsyncCallback(q_asyncShapeReady, this); + } + + if (!jsData.isValid()) { + // Standard route: The path and stroke/fill parameters are provided via + // QML elements. + const int count = qmlData.sp.count(); + renderer->beginSync(count); + + for (int i = 0; i < count; ++i) { + QQuickShapePath *p = qmlData.sp[i]; + int &dirty(QQuickShapePathPrivate::get(p)->dirty); + + if (dirty & QQuickShapePathPrivate::DirtyPath) + renderer->setPath(i, p->path()); + if (dirty & QQuickShapePathPrivate::DirtyStrokeColor) + renderer->setStrokeColor(i, p->strokeColor()); + if (dirty & QQuickShapePathPrivate::DirtyStrokeWidth) + renderer->setStrokeWidth(i, p->strokeWidth()); + if (dirty & QQuickShapePathPrivate::DirtyFillColor) + renderer->setFillColor(i, p->fillColor()); + if (dirty & QQuickShapePathPrivate::DirtyFillRule) + renderer->setFillRule(i, p->fillRule()); + if (dirty & QQuickShapePathPrivate::DirtyStyle) { + renderer->setJoinStyle(i, p->joinStyle(), p->miterLimit()); + renderer->setCapStyle(i, p->capStyle()); + } + if (dirty & QQuickShapePathPrivate::DirtyDash) + renderer->setStrokeStyle(i, p->strokeStyle(), p->dashOffset(), p->dashPattern()); + if (dirty & QQuickShapePathPrivate::DirtyFillGradient) + renderer->setFillGradient(i, p->fillGradient()); + + dirty = 0; + } + + renderer->endSync(useAsync); + } else { + + // ### there is no public API to reach this code path atm + Q_UNREACHABLE(); + + // Path and stroke/fill params provided from JavaScript. This avoids + // QObjects at the expense of not supporting changes afterwards. + const int count = jsData.paths.count(); + renderer->beginSync(count); + + for (int i = 0; i < count; ++i) { + renderer->setJSPath(i, jsData.paths[i]); + const QQuickShapeStrokeFillParams sfp(jsData.sfp[i]); + renderer->setStrokeColor(i, sfp.strokeColor); + renderer->setStrokeWidth(i, sfp.strokeWidth); + renderer->setFillColor(i, sfp.fillColor); + renderer->setFillRule(i, sfp.fillRule); + renderer->setJoinStyle(i, sfp.joinStyle, sfp.miterLimit); + renderer->setCapStyle(i, sfp.capStyle); + renderer->setStrokeStyle(i, sfp.strokeStyle, sfp.dashOffset, sfp.dashPattern); + renderer->setFillGradient(i, sfp.fillGradient); + } + + renderer->endSync(useAsync); + } + + if (!useAsync) + setStatus(QQuickShape::Ready); +} + +// ***** gradient support ***** + +/*! + \qmltype ShapeGradientStop + \instantiates QQuickShapeGradientStop + \inqmlmodule QtQuick.Shapes + \ingroup qtquick-paths + \ingroup qtquick-views + \inherits Object + \brief Defines a color at a position in a gradient + \since 5.10 + */ + +QQuickShapeGradientStop::QQuickShapeGradientStop(QObject *parent) + : QObject(parent), + m_position(0), + m_color(Qt::black) +{ +} + +/*! + \qmlproperty real QtQuick.Shapes::ShapeGradientStop::position + + The position and color properties describe the color used at a given + position in a gradient, as represented by a gradient stop. + + The default value is 0. + */ + +qreal QQuickShapeGradientStop::position() const +{ + return m_position; +} + +void QQuickShapeGradientStop::setPosition(qreal position) +{ + if (m_position != position) { + m_position = position; + if (QQuickShapeGradient *grad = qobject_cast<QQuickShapeGradient *>(parent())) + emit grad->updated(); + } +} + +/*! + \qmlproperty real QtQuick.Shapes::ShapeGradientStop::color + + The position and color properties describe the color used at a given + position in a gradient, as represented by a gradient stop. + + The default value is \c black. + */ + +QColor QQuickShapeGradientStop::color() const +{ + return m_color; +} + +void QQuickShapeGradientStop::setColor(const QColor &color) +{ + if (m_color != color) { + m_color = color; + if (QQuickShapeGradient *grad = qobject_cast<QQuickShapeGradient *>(parent())) + emit grad->updated(); + } +} + +/*! + \qmltype ShapeGradient + \instantiates QQuickShapeGradient + \inqmlmodule QtQuick.Shapes + \ingroup qtquick-paths + \ingroup qtquick-views + \inherits Object + \brief Base type of Shape fill gradients + \since 5.10 + + This is an abstract base class for gradients like ShapeLinearGradient and + cannot be created directly. + */ + +QQuickShapeGradient::QQuickShapeGradient(QObject *parent) + : QObject(parent), + m_spread(PadSpread) +{ +} + +int QQuickShapeGradient::countStops(QQmlListProperty<QObject> *list) +{ + QQuickShapeGradient *grad = qobject_cast<QQuickShapeGradient *>(list->object); + Q_ASSERT(grad); + return grad->m_stops.count(); +} + +QObject *QQuickShapeGradient::atStop(QQmlListProperty<QObject> *list, int index) +{ + QQuickShapeGradient *grad = qobject_cast<QQuickShapeGradient *>(list->object); + Q_ASSERT(grad); + return grad->m_stops.at(index); +} + +void QQuickShapeGradient::appendStop(QQmlListProperty<QObject> *list, QObject *stop) +{ + QQuickShapeGradientStop *sstop = qobject_cast<QQuickShapeGradientStop *>(stop); + if (!sstop) { + qWarning("Gradient stop list only supports QQuickShapeGradientStop elements"); + return; + } + QQuickShapeGradient *grad = qobject_cast<QQuickShapeGradient *>(list->object); + Q_ASSERT(grad); + sstop->setParent(grad); + grad->m_stops.append(sstop); +} + +/*! + \qmlproperty list<Object> QtQuick.Shapes::ShapeGradient::stops + \default + + The list of ShapeGradientStop objects defining the colors at given positions + in the gradient. + */ + +QQmlListProperty<QObject> QQuickShapeGradient::stops() +{ + return QQmlListProperty<QObject>(this, nullptr, + &QQuickShapeGradient::appendStop, + &QQuickShapeGradient::countStops, + &QQuickShapeGradient::atStop, + nullptr); +} + +QGradientStops QQuickShapeGradient::sortedGradientStops() const +{ + QGradientStops result; + for (int i = 0; i < m_stops.count(); ++i) { + QQuickShapeGradientStop *s = static_cast<QQuickShapeGradientStop *>(m_stops[i]); + int j = 0; + while (j < result.count() && result[j].first < s->position()) + ++j; + result.insert(j, QGradientStop(s->position(), s->color())); + } + return result; +} + +/*! + \qmlproperty enumeration QtQuick.Shapes::ShapeGradient::spred + + Specifies how the area outside the gradient area should be filled. The + default value is ShapeGradient.PadSpread. + + \list + \li ShapeGradient.PadSpread - The area is filled with the closest stop color. + \li ShapeGradient.RepeatSpread - The gradient is repeated outside the gradient area. + \li ShapeGradient.ReflectSpread - The gradient is reflected outside the gradient area. + \endlist + */ + +QQuickShapeGradient::SpreadMode QQuickShapeGradient::spread() const +{ + return m_spread; +} + +void QQuickShapeGradient::setSpread(SpreadMode mode) +{ + if (m_spread != mode) { + m_spread = mode; + emit spreadChanged(); + emit updated(); + } +} + +/*! + \qmltype ShapeLinearGradient + \instantiates QQuickShapeLinearGradient + \inqmlmodule QtQuick.Shapes + \ingroup qtquick-paths + \ingroup qtquick-views + \inherits ShapeGradient + \brief Linear gradient + \since 5.10 + + Linear gradients interpolate colors between start and end points. Outside + these points the gradient is either padded, reflected or repeated depending + on the spread type. + + \sa QLinearGradient + */ + +QQuickShapeLinearGradient::QQuickShapeLinearGradient(QObject *parent) + : QQuickShapeGradient(parent) +{ +} + +/*! + \qmlproperty real QtQuick.Shapes::ShapeLinearGradient::x1 + \qmlproperty real QtQuick.Shapes::ShapeLinearGradient::y1 + \qmlproperty real QtQuick.Shapes::ShapeLinearGradient::x2 + \qmlproperty real QtQuick.Shapes::ShapeLinearGradient::y2 + + These properties define the start and end points between which color + interpolation occurs. By default both the stard and end points are set to + (0, 0). + */ + +qreal QQuickShapeLinearGradient::x1() const +{ + return m_start.x(); +} + +void QQuickShapeLinearGradient::setX1(qreal v) +{ + if (m_start.x() != v) { + m_start.setX(v); + emit x1Changed(); + emit updated(); + } +} + +qreal QQuickShapeLinearGradient::y1() const +{ + return m_start.y(); +} + +void QQuickShapeLinearGradient::setY1(qreal v) +{ + if (m_start.y() != v) { + m_start.setY(v); + emit y1Changed(); + emit updated(); + } +} + +qreal QQuickShapeLinearGradient::x2() const +{ + return m_end.x(); +} + +void QQuickShapeLinearGradient::setX2(qreal v) +{ + if (m_end.x() != v) { + m_end.setX(v); + emit x2Changed(); + emit updated(); + } +} + +qreal QQuickShapeLinearGradient::y2() const +{ + return m_end.y(); +} + +void QQuickShapeLinearGradient::setY2(qreal v) +{ + if (m_end.y() != v) { + m_end.setY(v); + emit y2Changed(); + emit updated(); + } +} + +#ifndef QT_NO_OPENGL + +// contexts sharing with each other get the same cache instance +class QQuickShapeGradientCacheWrapper +{ +public: + QQuickShapeGradientCache *get(QOpenGLContext *context) + { + return m_resource.value<QQuickShapeGradientCache>(context); + } + +private: + QOpenGLMultiGroupSharedResource m_resource; +}; + +QQuickShapeGradientCache *QQuickShapeGradientCache::currentCache() +{ + static QQuickShapeGradientCacheWrapper qt_path_gradient_caches; + return qt_path_gradient_caches.get(QOpenGLContext::currentContext()); +} + +// let QOpenGLContext manage the lifetime of the cached textures +QQuickShapeGradientCache::~QQuickShapeGradientCache() +{ + m_cache.clear(); +} + +void QQuickShapeGradientCache::invalidateResource() +{ + m_cache.clear(); +} + +void QQuickShapeGradientCache::freeResource(QOpenGLContext *) +{ + qDeleteAll(m_cache); + m_cache.clear(); +} + +static void generateGradientColorTable(const QQuickShapeGradientCache::GradientDesc &gradient, + uint *colorTable, int size, float opacity) +{ + int pos = 0; + const QGradientStops &s = gradient.stops; + const bool colorInterpolation = true; + + uint alpha = qRound(opacity * 256); + uint current_color = ARGB_COMBINE_ALPHA(s[0].second.rgba(), alpha); + qreal incr = 1.0 / qreal(size); + qreal fpos = 1.5 * incr; + colorTable[pos++] = ARGB2RGBA(qPremultiply(current_color)); + + while (fpos <= s.first().first) { + colorTable[pos] = colorTable[pos - 1]; + pos++; + fpos += incr; + } + + if (colorInterpolation) + current_color = qPremultiply(current_color); + + const int sLast = s.size() - 1; + for (int i = 0; i < sLast; ++i) { + qreal delta = 1/(s[i+1].first - s[i].first); + uint next_color = ARGB_COMBINE_ALPHA(s[i + 1].second.rgba(), alpha); + if (colorInterpolation) + next_color = qPremultiply(next_color); + + while (fpos < s[i+1].first && pos < size) { + int dist = int(256 * ((fpos - s[i].first) * delta)); + int idist = 256 - dist; + if (colorInterpolation) + colorTable[pos] = ARGB2RGBA(INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist)); + else + colorTable[pos] = ARGB2RGBA(qPremultiply(INTERPOLATE_PIXEL_256(current_color, idist, next_color, dist))); + ++pos; + fpos += incr; + } + current_color = next_color; + } + + Q_ASSERT(s.size() > 0); + + uint last_color = ARGB2RGBA(qPremultiply(ARGB_COMBINE_ALPHA(s[sLast].second.rgba(), alpha))); + for ( ; pos < size; ++pos) + colorTable[pos] = last_color; + + colorTable[size-1] = last_color; +} + +QSGTexture *QQuickShapeGradientCache::get(const GradientDesc &grad) +{ + QSGPlainTexture *tx = m_cache[grad]; + if (!tx) { + QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); + GLuint id; + f->glGenTextures(1, &id); + f->glBindTexture(GL_TEXTURE_2D, id); + static const uint W = 1024; // texture size is 1024x1 + uint buf[W]; + generateGradientColorTable(grad, buf, W, 1.0f); + f->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, W, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, buf); + tx = new QSGPlainTexture; + tx->setTextureId(id); + switch (grad.spread) { + case QQuickShapeGradient::PadSpread: + tx->setHorizontalWrapMode(QSGTexture::ClampToEdge); + tx->setVerticalWrapMode(QSGTexture::ClampToEdge); + break; + case QQuickShapeGradient::RepeatSpread: + tx->setHorizontalWrapMode(QSGTexture::Repeat); + tx->setVerticalWrapMode(QSGTexture::Repeat); + break; + case QQuickShapeGradient::ReflectSpread: + tx->setHorizontalWrapMode(QSGTexture::MirroredRepeat); + tx->setVerticalWrapMode(QSGTexture::MirroredRepeat); + break; + default: + qWarning("Unknown gradient spread mode %d", grad.spread); + break; + } + m_cache[grad] = tx; + } + return tx; +} + +#endif // QT_NO_OPENGL + +QT_END_NAMESPACE + +#include "moc_qquickshape_p.cpp" diff --git a/src/imports/pathitem/qquickpathitem_p.h b/src/imports/shapes/qquickshape_p.h index c7c56fd5d8..5b3580dd1b 100644 --- a/src/imports/pathitem/qquickpathitem_p.h +++ b/src/imports/shapes/qquickshape_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QQUICKPATHITEM_P_H -#define QQUICKPATHITEM_P_H +#ifndef QQUICKSHAPE_P_H +#define QQUICKSHAPE_P_H // // W A R N I N G @@ -60,17 +60,17 @@ QT_BEGIN_NAMESPACE -class QQuickVisualPathPrivate; -class QQuickPathItemPrivate; +class QQuickShapePathPrivate; +class QQuickShapePrivate; -class QQuickPathGradientStop : public QObject +class QQuickShapeGradientStop : public QObject { Q_OBJECT Q_PROPERTY(qreal position READ position WRITE setPosition) Q_PROPERTY(QColor color READ color WRITE setColor) public: - QQuickPathGradientStop(QObject *parent = nullptr); + QQuickShapeGradientStop(QObject *parent = nullptr); qreal position() const; void setPosition(qreal position); @@ -83,7 +83,7 @@ private: QColor m_color; }; -class QQuickPathGradient : public QObject +class QQuickShapeGradient : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty<QObject> stops READ stops) @@ -98,7 +98,7 @@ public: }; Q_ENUM(SpreadMode) - QQuickPathGradient(QObject *parent = nullptr); + QQuickShapeGradient(QObject *parent = nullptr); QQmlListProperty<QObject> stops(); @@ -120,7 +120,7 @@ private: SpreadMode m_spread; }; -class QQuickPathLinearGradient : public QQuickPathGradient +class QQuickShapeLinearGradient : public QQuickShapeGradient { Q_OBJECT Q_PROPERTY(qreal x1 READ x1 WRITE setX1 NOTIFY x1Changed) @@ -130,7 +130,7 @@ class QQuickPathLinearGradient : public QQuickPathGradient Q_CLASSINFO("DefaultProperty", "stops") public: - QQuickPathLinearGradient(QObject *parent = nullptr); + QQuickShapeLinearGradient(QObject *parent = nullptr); qreal x1() const; void setX1(qreal v); @@ -152,7 +152,7 @@ private: QPointF m_end; }; -class QQuickVisualPath : public QObject +class QQuickShapePath : public QObject { Q_OBJECT @@ -169,7 +169,7 @@ class QQuickVisualPath : public QObject Q_PROPERTY(StrokeStyle strokeStyle READ strokeStyle WRITE setStrokeStyle NOTIFY strokeStyleChanged) Q_PROPERTY(qreal dashOffset READ dashOffset WRITE setDashOffset NOTIFY dashOffsetChanged) Q_PROPERTY(QVector<qreal> dashPattern READ dashPattern WRITE setDashPattern NOTIFY dashPatternChanged) - Q_PROPERTY(QQuickPathGradient *fillGradient READ fillGradient WRITE setFillGradient RESET resetFillGradient) + Q_PROPERTY(QQuickShapeGradient *fillGradient READ fillGradient WRITE setFillGradient RESET resetFillGradient) public: enum FillRule { @@ -198,8 +198,8 @@ public: }; Q_ENUM(StrokeStyle) - QQuickVisualPath(QObject *parent = nullptr); - ~QQuickVisualPath(); + QQuickShapePath(QObject *parent = nullptr); + ~QQuickShapePath(); QQuickPath *path() const; void setPath(QQuickPath *path); @@ -234,8 +234,8 @@ public: QVector<qreal> dashPattern() const; void setDashPattern(const QVector<qreal> &array); - QQuickPathGradient *fillGradient() const; - void setFillGradient(QQuickPathGradient *gradient); + QQuickShapeGradient *fillGradient() const; + void setFillGradient(QQuickShapeGradient *gradient); void resetFillGradient(); Q_SIGNALS: @@ -254,20 +254,20 @@ Q_SIGNALS: void fillGradientChanged(); private: - Q_DISABLE_COPY(QQuickVisualPath) - Q_DECLARE_PRIVATE(QQuickVisualPath) + Q_DISABLE_COPY(QQuickShapePath) + Q_DECLARE_PRIVATE(QQuickShapePath) Q_PRIVATE_SLOT(d_func(), void _q_pathChanged()) Q_PRIVATE_SLOT(d_func(), void _q_fillGradientChanged()) }; -class QQuickPathItem : public QQuickItem +class QQuickShape : public QQuickItem { Q_OBJECT Q_PROPERTY(RendererType renderer READ rendererType NOTIFY rendererChanged) Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) Q_PROPERTY(bool enableVendorExtensions READ enableVendorExtensions WRITE setEnableVendorExtensions NOTIFY enableVendorExtensionsChanged) Q_PROPERTY(Status status READ status NOTIFY statusChanged) - Q_PROPERTY(QQmlListProperty<QQuickVisualPath> elements READ elements) + Q_PROPERTY(QQmlListProperty<QQuickShapePath> elements READ elements) Q_CLASSINFO("DefaultProperty", "elements") public: @@ -286,8 +286,8 @@ public: }; Q_ENUM(Status) - QQuickPathItem(QQuickItem *parent = nullptr); - ~QQuickPathItem(); + QQuickShape(QQuickItem *parent = nullptr); + ~QQuickShape(); RendererType rendererType() const; @@ -299,13 +299,7 @@ public: Status status() const; - QQmlListProperty<QQuickVisualPath> elements(); - - Q_INVOKABLE void newPath(QQmlV4Function *args); - Q_INVOKABLE void newStrokeFillParams(QQmlV4Function *args); - Q_INVOKABLE void clearVisualPaths(QQmlV4Function *args); - Q_INVOKABLE void commitVisualPaths(QQmlV4Function *args); - Q_INVOKABLE void appendVisualPath(QQmlV4Function *args); + QQmlListProperty<QQuickShapePath> elements(); protected: QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) override; @@ -321,13 +315,13 @@ Q_SIGNALS: void statusChanged(); private: - Q_DISABLE_COPY(QQuickPathItem) - Q_DECLARE_PRIVATE(QQuickPathItem) - Q_PRIVATE_SLOT(d_func(), void _q_visualPathChanged()) + Q_DISABLE_COPY(QQuickShape) + Q_DECLARE_PRIVATE(QQuickShape) + Q_PRIVATE_SLOT(d_func(), void _q_shapePathChanged()) }; QT_END_NAMESPACE -QML_DECLARE_TYPE(QQuickPathItem) +QML_DECLARE_TYPE(QQuickShape) -#endif // QQUICKPATHITEM_P_H +#endif // QQUICKSHAPE_P_H diff --git a/src/imports/pathitem/qquickpathitem_p_p.h b/src/imports/shapes/qquickshape_p_p.h index 6dde314a30..7a503e36a9 100644 --- a/src/imports/pathitem/qquickpathitem_p_p.h +++ b/src/imports/shapes/qquickshape_p_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QQUICKPATHITEM_P_P_H -#define QQUICKPATHITEM_P_P_H +#ifndef QQUICKSHAPE_P_P_H +#define QQUICKSHAPE_P_P_H // // W A R N I N G @@ -51,7 +51,7 @@ // We mean it. // -#include "qquickpathitem_p.h" +#include "qquickshape_p.h" #include <QtQuick/private/qquickitem_p.h> #include <QPainterPath> #include <QColor> @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE class QSGPlainTexture; -struct QQuickPathItemPath +struct QQuickShapePathCommands { enum Command { MoveTo, @@ -78,21 +78,21 @@ struct QQuickPathItemPath QPainterPath toPainterPath() const; }; -struct QQuickPathItemStrokeFillParams +struct QQuickShapeStrokeFillParams { - QQuickPathItemStrokeFillParams(); + QQuickShapeStrokeFillParams(); QColor strokeColor; qreal strokeWidth; QColor fillColor; - QQuickVisualPath::FillRule fillRule; - QQuickVisualPath::JoinStyle joinStyle; + QQuickShapePath::FillRule fillRule; + QQuickShapePath::JoinStyle joinStyle; int miterLimit; - QQuickVisualPath::CapStyle capStyle; - QQuickVisualPath::StrokeStyle strokeStyle; + QQuickShapePath::CapStyle capStyle; + QQuickShapePath::StrokeStyle strokeStyle; qreal dashOffset; QVector<qreal> dashPattern; - QQuickPathGradient *fillGradient; + QQuickShapeGradient *fillGradient; }; class QQuickAbstractPathRenderer @@ -113,17 +113,17 @@ public: // - QML API virtual void setPath(int index, const QQuickPath *path) = 0; // - JS API - virtual void setJSPath(int index, const QQuickPathItemPath &path) = 0; + virtual void setJSPath(int index, const QQuickShapePathCommands &path) = 0; // - stroke/fill parameters virtual void setStrokeColor(int index, const QColor &color) = 0; virtual void setStrokeWidth(int index, qreal w) = 0; virtual void setFillColor(int index, const QColor &color) = 0; - virtual void setFillRule(int index, QQuickVisualPath::FillRule fillRule) = 0; - virtual void setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) = 0; - virtual void setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) = 0; - virtual void setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, + virtual void setFillRule(int index, QQuickShapePath::FillRule fillRule) = 0; + virtual void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) = 0; + virtual void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) = 0; + virtual void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) = 0; - virtual void setFillGradient(int index, QQuickPathGradient *gradient) = 0; + virtual void setFillGradient(int index, QQuickShapeGradient *gradient) = 0; // Render thread, with gui blocked virtual void updateNode() = 0; @@ -131,9 +131,9 @@ public: Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAbstractPathRenderer::Flags) -class QQuickVisualPathPrivate : public QObjectPrivate +class QQuickShapePathPrivate : public QObjectPrivate { - Q_DECLARE_PUBLIC(QQuickVisualPath) + Q_DECLARE_PUBLIC(QQuickShapePath) public: enum Dirty { @@ -149,66 +149,66 @@ public: DirtyAll = 0xFF }; - QQuickVisualPathPrivate(); + QQuickShapePathPrivate(); void _q_pathChanged(); void _q_fillGradientChanged(); - static QQuickVisualPathPrivate *get(QQuickVisualPath *p) { return p->d_func(); } + static QQuickShapePathPrivate *get(QQuickShapePath *p) { return p->d_func(); } QQuickPath *path; int dirty; - QQuickPathItemStrokeFillParams sfp; + QQuickShapeStrokeFillParams sfp; }; -class QQuickPathItemPrivate : public QQuickItemPrivate +class QQuickShapePrivate : public QQuickItemPrivate { - Q_DECLARE_PUBLIC(QQuickPathItem) + Q_DECLARE_PUBLIC(QQuickShape) public: - QQuickPathItemPrivate(); - ~QQuickPathItemPrivate(); + QQuickShapePrivate(); + ~QQuickShapePrivate(); void createRenderer(); QSGNode *createNode(); void sync(); - void _q_visualPathChanged(); - void setStatus(QQuickPathItem::Status newStatus); + void _q_shapePathChanged(); + void setStatus(QQuickShape::Status newStatus); - static QQuickPathItemPrivate *get(QQuickPathItem *item) { return item->d_func(); } + static QQuickShapePrivate *get(QQuickShape *item) { return item->d_func(); } bool componentComplete; - bool vpChanged; - QQuickPathItem::RendererType rendererType; + bool spChanged; + QQuickShape::RendererType rendererType; bool async; - QQuickPathItem::Status status; + QQuickShape::Status status; QQuickAbstractPathRenderer *renderer; struct { - QVector<QQuickVisualPath *> vp; + QVector<QQuickShapePath *> sp; } qmlData; struct { bool isValid() const { Q_ASSERT(paths.count() == sfp.count()); return !paths.isEmpty(); } - QVector<QQuickPathItemPath> paths; - QVector<QQuickPathItemStrokeFillParams> sfp; + QVector<QQuickShapePathCommands> paths; + QVector<QQuickShapeStrokeFillParams> sfp; } jsData; bool enableVendorExts; }; -class QQuickPathItemPathObject : public QObject +class QQuickShapePathObject : public QObject { Q_OBJECT public: - QQuickPathItemPathObject(QObject *parent = nullptr) : QObject(parent) { } + QQuickShapePathObject(QObject *parent = nullptr) : QObject(parent) { } void setV4Engine(QV4::ExecutionEngine *engine); QV4::ReturnedValue v4value() const { return m_v4value.value(); } - QQuickPathItemPath path; + QQuickShapePath path; void clear(); @@ -216,17 +216,17 @@ private: QV4::PersistentValue m_v4value; }; -class QQuickPathItemStrokeFillParamsObject : public QObject +class QQuickShapeStrokeFillParamsObject : public QObject { Q_OBJECT public: - QQuickPathItemStrokeFillParamsObject(QObject *parent = nullptr) : QObject(parent) { } + QQuickShapeStrokeFillParamsObject(QObject *parent = nullptr) : QObject(parent) { } void setV4Engine(QV4::ExecutionEngine *engine); QV4::ReturnedValue v4value() const { return m_v4value.value(); } - QQuickPathItemStrokeFillParams sfp; + QQuickShapeStrokeFillParams sfp; QV4::PersistentValue v4fillGradient; void clear(); @@ -237,14 +237,14 @@ private: #ifndef QT_NO_OPENGL -class QQuickPathItemGradientCache : public QOpenGLSharedResource +class QQuickShapeGradientCache : public QOpenGLSharedResource { public: struct GradientDesc { QGradientStops stops; QPointF start; QPointF end; - QQuickPathGradient::SpreadMode spread; + QQuickShapeGradient::SpreadMode spread; bool operator==(const GradientDesc &other) const { return start == other.start && end == other.end && spread == other.spread @@ -252,21 +252,21 @@ public: } }; - QQuickPathItemGradientCache(QOpenGLContext *context) : QOpenGLSharedResource(context->shareGroup()) { } - ~QQuickPathItemGradientCache(); + QQuickShapeGradientCache(QOpenGLContext *context) : QOpenGLSharedResource(context->shareGroup()) { } + ~QQuickShapeGradientCache(); void invalidateResource() override; void freeResource(QOpenGLContext *) override; QSGTexture *get(const GradientDesc &grad); - static QQuickPathItemGradientCache *currentCache(); + static QQuickShapeGradientCache *currentCache(); private: QHash<GradientDesc, QSGPlainTexture *> m_cache; }; -inline uint qHash(const QQuickPathItemGradientCache::GradientDesc &v, uint seed = 0) +inline uint qHash(const QQuickShapeGradientCache::GradientDesc &v, uint seed = 0) { uint h = seed; h += v.start.x() + v.end.y() + v.spread; diff --git a/src/imports/pathitem/qquickpathitemgenericrenderer.cpp b/src/imports/shapes/qquickshapegenericrenderer.cpp index 4e8fe55df2..ff226959eb 100644 --- a/src/imports/pathitem/qquickpathitemgenericrenderer.cpp +++ b/src/imports/shapes/qquickshapegenericrenderer.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "qquickpathitemgenericrenderer_p.h" +#include "qquickshapegenericrenderer_p.h" #include <QtGui/private/qtriangulator_p.h> #include <QtGui/private/qtriangulatingstroker_p.h> #include <QThreadPool> @@ -56,16 +56,16 @@ static const qreal TRI_SCALE = 1; struct ColoredVertex // must match QSGGeometry::ColoredPoint2D { float x, y; - QQuickPathItemGenericRenderer::Color4ub color; - void set(float nx, float ny, QQuickPathItemGenericRenderer::Color4ub ncolor) + QQuickShapeGenericRenderer::Color4ub color; + void set(float nx, float ny, QQuickShapeGenericRenderer::Color4ub ncolor) { x = nx; y = ny; color = ncolor; } }; -static inline QQuickPathItemGenericRenderer::Color4ub colorToColor4ub(const QColor &c) +static inline QQuickShapeGenericRenderer::Color4ub colorToColor4ub(const QColor &c) { - QQuickPathItemGenericRenderer::Color4ub color = { + QQuickShapeGenericRenderer::Color4ub color = { uchar(qRound(c.redF() * c.alphaF() * 255)), uchar(qRound(c.greenF() * c.alphaF() * 255)), uchar(qRound(c.blueF() * c.alphaF() * 255)), @@ -74,7 +74,7 @@ static inline QQuickPathItemGenericRenderer::Color4ub colorToColor4ub(const QCol return color; } -QQuickPathItemGenericStrokeFillNode::QQuickPathItemGenericStrokeFillNode(QQuickWindow *window) +QQuickShapeGenericStrokeFillNode::QQuickShapeGenericStrokeFillNode(QQuickWindow *window) : m_geometry(new QSGGeometry(QSGGeometry::defaultAttributes_ColoredPoint2D(), 0, 0)), m_window(window), m_material(nullptr) @@ -86,24 +86,24 @@ QQuickPathItemGenericStrokeFillNode::QQuickPathItemGenericStrokeFillNode(QQuickW #endif } -QQuickPathItemGenericStrokeFillNode::~QQuickPathItemGenericStrokeFillNode() +QQuickShapeGenericStrokeFillNode::~QQuickShapeGenericStrokeFillNode() { delete m_geometry; } -void QQuickPathItemGenericStrokeFillNode::activateMaterial(Material m) +void QQuickShapeGenericStrokeFillNode::activateMaterial(Material m) { switch (m) { case MatSolidColor: // Use vertexcolor material. Items with different colors remain batchable // this way, at the expense of having to provide per-vertex color values. if (!m_solidColorMaterial) - m_solidColorMaterial.reset(QQuickPathItemGenericMaterialFactory::createVertexColor(m_window)); + m_solidColorMaterial.reset(QQuickShapeGenericMaterialFactory::createVertexColor(m_window)); m_material = m_solidColorMaterial.data(); break; case MatLinearGradient: if (!m_linearGradientMaterial) - m_linearGradientMaterial.reset(QQuickPathItemGenericMaterialFactory::createLinearGradient(m_window, this)); + m_linearGradientMaterial.reset(QQuickShapeGenericMaterialFactory::createLinearGradient(m_window, this)); m_material = m_linearGradientMaterial.data(); break; default: @@ -148,9 +148,9 @@ static bool q_supportsElementIndexUint(QSGRendererInterface::GraphicsApi api) return elementIndexUint; } -QQuickPathItemGenericRenderer::~QQuickPathItemGenericRenderer() +QQuickShapeGenericRenderer::~QQuickShapeGenericRenderer() { - for (VisualPathData &d : m_vp) { + for (ShapePathData &d : m_sp) { if (d.pendingFill) d.pendingFill->orphaned = true; if (d.pendingStroke) @@ -161,95 +161,95 @@ QQuickPathItemGenericRenderer::~QQuickPathItemGenericRenderer() // sync, and so triangulation too, happens on the gui thread // - except when async is set, in which case triangulation is moved to worker threads -void QQuickPathItemGenericRenderer::beginSync(int totalCount) +void QQuickShapeGenericRenderer::beginSync(int totalCount) { - if (m_vp.count() != totalCount) { - m_vp.resize(totalCount); + if (m_sp.count() != totalCount) { + m_sp.resize(totalCount); m_accDirty |= DirtyList; } - for (VisualPathData &d : m_vp) + for (ShapePathData &d : m_sp) d.syncDirty = 0; } -void QQuickPathItemGenericRenderer::setPath(int index, const QQuickPath *path) +void QQuickShapeGenericRenderer::setPath(int index, const QQuickPath *path) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.path = path ? path->path() : QPainterPath(); d.syncDirty |= DirtyFillGeom | DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setJSPath(int index, const QQuickPathItemPath &path) +void QQuickShapeGenericRenderer::setJSPath(int index, const QQuickShapePathCommands &path) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.path = path.toPainterPath(); d.syncDirty |= DirtyFillGeom | DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setStrokeColor(int index, const QColor &color) +void QQuickShapeGenericRenderer::setStrokeColor(int index, const QColor &color) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.strokeColor = colorToColor4ub(color); d.syncDirty |= DirtyColor; } -void QQuickPathItemGenericRenderer::setStrokeWidth(int index, qreal w) +void QQuickShapeGenericRenderer::setStrokeWidth(int index, qreal w) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.strokeWidth = w; if (w >= 0.0f) d.pen.setWidthF(w); d.syncDirty |= DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setFillColor(int index, const QColor &color) +void QQuickShapeGenericRenderer::setFillColor(int index, const QColor &color) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.fillColor = colorToColor4ub(color); d.syncDirty |= DirtyColor; } -void QQuickPathItemGenericRenderer::setFillRule(int index, QQuickVisualPath::FillRule fillRule) +void QQuickShapeGenericRenderer::setFillRule(int index, QQuickShapePath::FillRule fillRule) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.fillRule = Qt::FillRule(fillRule); d.syncDirty |= DirtyFillGeom; } -void QQuickPathItemGenericRenderer::setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) +void QQuickShapeGenericRenderer::setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.pen.setJoinStyle(Qt::PenJoinStyle(joinStyle)); d.pen.setMiterLimit(miterLimit); d.syncDirty |= DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) +void QQuickShapeGenericRenderer::setCapStyle(int index, QQuickShapePath::CapStyle capStyle) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.pen.setCapStyle(Qt::PenCapStyle(capStyle)); d.syncDirty |= DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, +void QQuickShapeGenericRenderer::setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.pen.setStyle(Qt::PenStyle(strokeStyle)); - if (strokeStyle == QQuickVisualPath::DashLine) { + if (strokeStyle == QQuickShapePath::DashLine) { d.pen.setDashPattern(dashPattern); d.pen.setDashOffset(dashOffset); } d.syncDirty |= DirtyStrokeGeom; } -void QQuickPathItemGenericRenderer::setFillGradient(int index, QQuickPathGradient *gradient) +void QQuickShapeGenericRenderer::setFillGradient(int index, QQuickShapeGradient *gradient) { - VisualPathData &d(m_vp[index]); + ShapePathData &d(m_sp[index]); d.fillGradientActive = gradient != nullptr; if (gradient) { d.fillGradient.stops = gradient->sortedGradientStops(); d.fillGradient.spread = gradient->spread(); - if (QQuickPathLinearGradient *g = qobject_cast<QQuickPathLinearGradient *>(gradient)) { + if (QQuickShapeLinearGradient *g = qobject_cast<QQuickShapeLinearGradient *>(gradient)) { d.fillGradient.start = QPointF(g->x1(), g->y1()); d.fillGradient.end = QPointF(g->x2(), g->y2()); } else { @@ -259,19 +259,19 @@ void QQuickPathItemGenericRenderer::setFillGradient(int index, QQuickPathGradien d.syncDirty |= DirtyFillGradient; } -void QQuickPathItemFillRunnable::run() +void QQuickShapeFillRunnable::run() { - QQuickPathItemGenericRenderer::triangulateFill(path, fillColor, &fillVertices, &fillIndices, &indexType, supportsElementIndexUint); + QQuickShapeGenericRenderer::triangulateFill(path, fillColor, &fillVertices, &fillIndices, &indexType, supportsElementIndexUint); emit done(this); } -void QQuickPathItemStrokeRunnable::run() +void QQuickShapeStrokeRunnable::run() { - QQuickPathItemGenericRenderer::triangulateStroke(path, pen, strokeColor, &strokeVertices, clipSize); + QQuickShapeGenericRenderer::triangulateStroke(path, pen, strokeColor, &strokeVertices, clipSize); emit done(this); } -void QQuickPathItemGenericRenderer::setAsyncCallback(void (*callback)(void *), void *data) +void QQuickShapeGenericRenderer::setAsyncCallback(void (*callback)(void *), void *data) { m_asyncCallback = callback; m_asyncCallbackData = data; @@ -285,12 +285,12 @@ static void deletePathWorkThreadPool() pathWorkThreadPool = nullptr; } -void QQuickPathItemGenericRenderer::endSync(bool async) +void QQuickShapeGenericRenderer::endSync(bool async) { bool didKickOffAsync = false; - for (int i = 0; i < m_vp.count(); ++i) { - VisualPathData &d(m_vp[i]); + for (int i = 0; i < m_sp.count(); ++i) { + ShapePathData &d(m_sp[i]); if (!d.syncDirty) continue; @@ -322,7 +322,7 @@ void QQuickPathItemGenericRenderer::endSync(bool async) if (m_api == QSGRendererInterface::Unknown) m_api = m_item->window()->rendererInterface()->graphicsApi(); if (async) { - QQuickPathItemFillRunnable *r = new QQuickPathItemFillRunnable; + QQuickShapeFillRunnable *r = new QQuickShapeFillRunnable; r->setAutoDelete(false); if (d.pendingFill) d.pendingFill->orphaned = true; @@ -330,13 +330,13 @@ void QQuickPathItemGenericRenderer::endSync(bool async) r->path = d.path; r->fillColor = d.fillColor; r->supportsElementIndexUint = q_supportsElementIndexUint(m_api); - // Unlikely in practice but in theory m_vp could be + // Unlikely in practice but in theory m_sp could be // resized. Therefore, capture 'i' instead of 'd'. - QObject::connect(r, &QQuickPathItemFillRunnable::done, qApp, [this, i](QQuickPathItemFillRunnable *r) { + QObject::connect(r, &QQuickShapeFillRunnable::done, qApp, [this, i](QQuickShapeFillRunnable *r) { // Bail out when orphaned (meaning either another run was // started after this one, or the renderer got destroyed). - if (!r->orphaned && i < m_vp.count()) { - VisualPathData &d(m_vp[i]); + if (!r->orphaned && i < m_sp.count()) { + ShapePathData &d(m_sp[i]); d.fillVertices = r->fillVertices; d.fillIndices = r->fillIndices; d.indexType = r->indexType; @@ -355,7 +355,7 @@ void QQuickPathItemGenericRenderer::endSync(bool async) if ((d.syncDirty & DirtyStrokeGeom) && d.strokeWidth >= 0.0f && d.strokeColor.a) { if (async) { - QQuickPathItemStrokeRunnable *r = new QQuickPathItemStrokeRunnable; + QQuickShapeStrokeRunnable *r = new QQuickShapeStrokeRunnable; r->setAutoDelete(false); if (d.pendingStroke) d.pendingStroke->orphaned = true; @@ -364,9 +364,9 @@ void QQuickPathItemGenericRenderer::endSync(bool async) r->pen = d.pen; r->strokeColor = d.strokeColor; r->clipSize = QSize(m_item->width(), m_item->height()); - QObject::connect(r, &QQuickPathItemStrokeRunnable::done, qApp, [this, i](QQuickPathItemStrokeRunnable *r) { - if (!r->orphaned && i < m_vp.count()) { - VisualPathData &d(m_vp[i]); + QObject::connect(r, &QQuickShapeStrokeRunnable::done, qApp, [this, i](QQuickShapeStrokeRunnable *r) { + if (!r->orphaned && i < m_sp.count()) { + ShapePathData &d(m_sp[i]); d.strokeVertices = r->strokeVertices; d.pendingStroke = nullptr; d.effectiveDirty |= DirtyStrokeGeom; @@ -387,9 +387,9 @@ void QQuickPathItemGenericRenderer::endSync(bool async) m_asyncCallback(m_asyncCallbackData); } -void QQuickPathItemGenericRenderer::maybeUpdateAsyncItem() +void QQuickShapeGenericRenderer::maybeUpdateAsyncItem() { - for (const VisualPathData &d : qAsConst(m_vp)) { + for (const ShapePathData &d : qAsConst(m_sp)) { if (d.pendingFill || d.pendingStroke) return; } @@ -401,7 +401,7 @@ void QQuickPathItemGenericRenderer::maybeUpdateAsyncItem() // the stroke/fill triangulation functions may be invoked either on the gui // thread or some worker thread and must thus be self-contained. -void QQuickPathItemGenericRenderer::triangulateFill(const QPainterPath &path, +void QQuickShapeGenericRenderer::triangulateFill(const QPainterPath &path, const Color4ub &fillColor, VertexContainerType *fillVertices, IndexContainerType *fillIndices, @@ -433,7 +433,7 @@ void QQuickPathItemGenericRenderer::triangulateFill(const QPainterPath &path, memcpy(fillIndices->data(), ts.indices.data(), indexByteSize); } -void QQuickPathItemGenericRenderer::triangulateStroke(const QPainterPath &path, +void QQuickShapeGenericRenderer::triangulateStroke(const QPainterPath &path, const QPen &pen, const Color4ub &strokeColor, VertexContainerType *strokeVertices, @@ -470,7 +470,7 @@ void QQuickPathItemGenericRenderer::triangulateStroke(const QPainterPath &path, vdst[i].set(vsrc[i * 2], vsrc[i * 2 + 1], strokeColor); } -void QQuickPathItemGenericRenderer::setRootNode(QQuickPathItemGenericNode *node) +void QQuickShapeGenericRenderer::setRootNode(QQuickShapeGenericNode *node) { if (m_rootNode != node) { m_rootNode = node; @@ -479,7 +479,7 @@ void QQuickPathItemGenericRenderer::setRootNode(QQuickPathItemGenericNode *node) } // on the render thread with gui blocked -void QQuickPathItemGenericRenderer::updateNode() +void QQuickShapeGenericRenderer::updateNode() { if (!m_rootNode || !m_accDirty) return; @@ -494,17 +494,17 @@ void QQuickPathItemGenericRenderer::updateNode() // ... // ... - QQuickPathItemGenericNode **nodePtr = &m_rootNode; - QQuickPathItemGenericNode *prevNode = nullptr; + QQuickShapeGenericNode **nodePtr = &m_rootNode; + QQuickShapeGenericNode *prevNode = nullptr; - for (VisualPathData &d : m_vp) { + for (ShapePathData &d : m_sp) { if (!*nodePtr) { - *nodePtr = new QQuickPathItemGenericNode; + *nodePtr = new QQuickShapeGenericNode; prevNode->m_next = *nodePtr; prevNode->appendChildNode(*nodePtr); } - QQuickPathItemGenericNode *node = *nodePtr; + QQuickShapeGenericNode *node = *nodePtr; if (m_accDirty & DirtyList) d.effectiveDirty |= DirtyFillGeom | DirtyStrokeGeom | DirtyColor | DirtyFillGradient; @@ -519,7 +519,7 @@ void QQuickPathItemGenericRenderer::updateNode() delete node->m_fillNode; node->m_fillNode = nullptr; } else if (!node->m_fillNode) { - node->m_fillNode = new QQuickPathItemGenericStrokeFillNode(m_item->window()); + node->m_fillNode = new QQuickShapeGenericStrokeFillNode(m_item->window()); if (node->m_strokeNode) node->removeChildNode(node->m_strokeNode); node->appendChildNode(node->m_fillNode); @@ -532,7 +532,7 @@ void QQuickPathItemGenericRenderer::updateNode() delete node->m_strokeNode; node->m_strokeNode = nullptr; } else if (!node->m_strokeNode) { - node->m_strokeNode = new QQuickPathItemGenericStrokeFillNode(m_item->window()); + node->m_strokeNode = new QQuickShapeGenericStrokeFillNode(m_item->window()); node->appendChildNode(node->m_strokeNode); d.effectiveDirty |= DirtyStrokeGeom; } @@ -555,7 +555,7 @@ void QQuickPathItemGenericRenderer::updateNode() m_accDirty = 0; } -void QQuickPathItemGenericRenderer::updateShadowDataInNode(VisualPathData *d, QQuickPathItemGenericStrokeFillNode *n) +void QQuickShapeGenericRenderer::updateShadowDataInNode(ShapePathData *d, QQuickShapeGenericStrokeFillNode *n) { if (d->fillGradientActive) { if (d->effectiveDirty & DirtyFillGradient) @@ -563,7 +563,7 @@ void QQuickPathItemGenericRenderer::updateShadowDataInNode(VisualPathData *d, QQ } } -void QQuickPathItemGenericRenderer::updateFillNode(VisualPathData *d, QQuickPathItemGenericNode *node) +void QQuickShapeGenericRenderer::updateFillNode(ShapePathData *d, QQuickShapeGenericNode *node) { if (!node->m_fillNode) return; @@ -572,7 +572,7 @@ void QQuickPathItemGenericRenderer::updateFillNode(VisualPathData *d, QQuickPath // Make a copy of the data that will be accessed by the material on // the render thread. This must be done even when we bail out below. - QQuickPathItemGenericStrokeFillNode *n = node->m_fillNode; + QQuickShapeGenericStrokeFillNode *n = node->m_fillNode; updateShadowDataInNode(d, n); QSGGeometry *g = n->m_geometry; @@ -585,7 +585,7 @@ void QQuickPathItemGenericRenderer::updateFillNode(VisualPathData *d, QQuickPath } if (d->fillGradientActive) { - n->activateMaterial(QQuickPathItemGenericStrokeFillNode::MatLinearGradient); + n->activateMaterial(QQuickShapeGenericStrokeFillNode::MatLinearGradient); if (d->effectiveDirty & DirtyFillGradient) { // Gradients are implemented via a texture-based material. n->markDirty(QSGNode::DirtyMaterial); @@ -594,7 +594,7 @@ void QQuickPathItemGenericRenderer::updateFillNode(VisualPathData *d, QQuickPath return; } } else { - n->activateMaterial(QQuickPathItemGenericStrokeFillNode::MatSolidColor); + n->activateMaterial(QQuickShapeGenericStrokeFillNode::MatSolidColor); // fast path for updating only color values when no change in vertex positions if ((d->effectiveDirty & DirtyColor) && !(d->effectiveDirty & DirtyFillGeom)) { ColoredVertex *vdst = reinterpret_cast<ColoredVertex *>(g->vertexData()); @@ -623,14 +623,14 @@ void QQuickPathItemGenericRenderer::updateFillNode(VisualPathData *d, QQuickPath n->markDirty(QSGNode::DirtyGeometry); } -void QQuickPathItemGenericRenderer::updateStrokeNode(VisualPathData *d, QQuickPathItemGenericNode *node) +void QQuickShapeGenericRenderer::updateStrokeNode(ShapePathData *d, QQuickShapeGenericNode *node) { if (!node->m_strokeNode) return; if (!(d->effectiveDirty & (DirtyStrokeGeom | DirtyColor))) return; - QQuickPathItemGenericStrokeFillNode *n = node->m_strokeNode; + QQuickShapeGenericStrokeFillNode *n = node->m_strokeNode; QSGGeometry *g = n->m_geometry; if (d->strokeVertices.isEmpty()) { if (g->vertexCount() || g->indexCount()) { @@ -660,7 +660,7 @@ void QQuickPathItemGenericRenderer::updateStrokeNode(VisualPathData *d, QQuickPa memcpy(g->vertexData(), d->strokeVertices.constData(), g->vertexCount() * g->sizeOfVertex()); } -QSGMaterial *QQuickPathItemGenericMaterialFactory::createVertexColor(QQuickWindow *window) +QSGMaterial *QQuickShapeGenericMaterialFactory::createVertexColor(QQuickWindow *window) { QSGRendererInterface::GraphicsApi api = window->rendererInterface()->graphicsApi(); @@ -673,14 +673,14 @@ QSGMaterial *QQuickPathItemGenericMaterialFactory::createVertexColor(QQuickWindo return nullptr; } -QSGMaterial *QQuickPathItemGenericMaterialFactory::createLinearGradient(QQuickWindow *window, - QQuickPathItemGenericStrokeFillNode *node) +QSGMaterial *QQuickShapeGenericMaterialFactory::createLinearGradient(QQuickWindow *window, + QQuickShapeGenericStrokeFillNode *node) { QSGRendererInterface::GraphicsApi api = window->rendererInterface()->graphicsApi(); #ifndef QT_NO_OPENGL if (api == QSGRendererInterface::OpenGL) // ### so much for "generic"... - return new QQuickPathItemLinearGradientMaterial(node); + return new QQuickShapeLinearGradientMaterial(node); #endif qWarning("Linear gradient material: Unsupported graphics API %d", api); @@ -689,9 +689,9 @@ QSGMaterial *QQuickPathItemGenericMaterialFactory::createLinearGradient(QQuickWi #ifndef QT_NO_OPENGL -QSGMaterialType QQuickPathItemLinearGradientShader::type; +QSGMaterialType QQuickShapeLinearGradientShader::type; -QQuickPathItemLinearGradientShader::QQuickPathItemLinearGradientShader() +QQuickShapeLinearGradientShader::QQuickShapeLinearGradientShader() { setShaderSourceFile(QOpenGLShader::Vertex, QStringLiteral(":/qt-project.org/items/shaders/lineargradient.vert")); @@ -699,7 +699,7 @@ QQuickPathItemLinearGradientShader::QQuickPathItemLinearGradientShader() QStringLiteral(":/qt-project.org/items/shaders/lineargradient.frag")); } -void QQuickPathItemLinearGradientShader::initialize() +void QQuickShapeLinearGradientShader::initialize() { m_opacityLoc = program()->uniformLocation("opacity"); m_matrixLoc = program()->uniformLocation("matrix"); @@ -707,9 +707,9 @@ void QQuickPathItemLinearGradientShader::initialize() m_gradEndLoc = program()->uniformLocation("gradEnd"); } -void QQuickPathItemLinearGradientShader::updateState(const RenderState &state, QSGMaterial *mat, QSGMaterial *) +void QQuickShapeLinearGradientShader::updateState(const RenderState &state, QSGMaterial *mat, QSGMaterial *) { - QQuickPathItemLinearGradientMaterial *m = static_cast<QQuickPathItemLinearGradientMaterial *>(mat); + QQuickShapeLinearGradientMaterial *m = static_cast<QQuickShapeLinearGradientMaterial *>(mat); if (state.isOpacityDirty()) program()->setUniformValue(m_opacityLoc, state.opacity()); @@ -717,33 +717,33 @@ void QQuickPathItemLinearGradientShader::updateState(const RenderState &state, Q if (state.isMatrixDirty()) program()->setUniformValue(m_matrixLoc, state.combinedMatrix()); - QQuickPathItemGenericStrokeFillNode *node = m->node(); + QQuickShapeGenericStrokeFillNode *node = m->node(); program()->setUniformValue(m_gradStartLoc, QVector2D(node->m_fillGradient.start)); program()->setUniformValue(m_gradEndLoc, QVector2D(node->m_fillGradient.end)); - QSGTexture *tx = QQuickPathItemGradientCache::currentCache()->get(node->m_fillGradient); + QSGTexture *tx = QQuickShapeGradientCache::currentCache()->get(node->m_fillGradient); tx->bind(); } -char const *const *QQuickPathItemLinearGradientShader::attributeNames() const +char const *const *QQuickShapeLinearGradientShader::attributeNames() const { static const char *const attr[] = { "vertexCoord", "vertexColor", nullptr }; return attr; } -int QQuickPathItemLinearGradientMaterial::compare(const QSGMaterial *other) const +int QQuickShapeLinearGradientMaterial::compare(const QSGMaterial *other) const { Q_ASSERT(other && type() == other->type()); - const QQuickPathItemLinearGradientMaterial *m = static_cast<const QQuickPathItemLinearGradientMaterial *>(other); + const QQuickShapeLinearGradientMaterial *m = static_cast<const QQuickShapeLinearGradientMaterial *>(other); - QQuickPathItemGenericStrokeFillNode *a = node(); - QQuickPathItemGenericStrokeFillNode *b = m->node(); + QQuickShapeGenericStrokeFillNode *a = node(); + QQuickShapeGenericStrokeFillNode *b = m->node(); Q_ASSERT(a && b); if (a == b) return 0; - const QQuickPathItemGradientCache::GradientDesc *ga = &a->m_fillGradient; - const QQuickPathItemGradientCache::GradientDesc *gb = &b->m_fillGradient; + const QQuickShapeGradientCache::GradientDesc *ga = &a->m_fillGradient; + const QQuickShapeGradientCache::GradientDesc *gb = &b->m_fillGradient; if (int d = ga->spread - gb->spread) return d; diff --git a/src/imports/pathitem/qquickpathitemgenericrenderer_p.h b/src/imports/shapes/qquickshapegenericrenderer_p.h index 70a9e88d2f..ba50f50309 100644 --- a/src/imports/pathitem/qquickpathitemgenericrenderer_p.h +++ b/src/imports/shapes/qquickshapegenericrenderer_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QQUICKPATHITEMGENERICRENDERER_P_H -#define QQUICKPATHITEMGENERICRENDERER_P_H +#ifndef QQUICKSHAPEGENERICRENDERER_P_H +#define QQUICKSHAPEGENERICRENDERER_P_H // // W A R N I N G @@ -51,7 +51,7 @@ // We mean it. // -#include "qquickpathitem_p_p.h" +#include "qquickshape_p_p.h" #include <qsgnode.h> #include <qsggeometry.h> #include <qsgmaterial.h> @@ -60,12 +60,12 @@ QT_BEGIN_NAMESPACE -class QQuickPathItemGenericNode; -class QQuickPathItemGenericStrokeFillNode; -class QQuickPathItemFillRunnable; -class QQuickPathItemStrokeRunnable; +class QQuickShapeGenericNode; +class QQuickShapeGenericStrokeFillNode; +class QQuickShapeFillRunnable; +class QQuickShapeStrokeRunnable; -class QQuickPathItemGenericRenderer : public QQuickAbstractPathRenderer +class QQuickShapeGenericRenderer : public QQuickAbstractPathRenderer { public: enum Dirty { @@ -76,34 +76,34 @@ public: DirtyList = 0x10 // only for accDirty }; - QQuickPathItemGenericRenderer(QQuickItem *item) + QQuickShapeGenericRenderer(QQuickItem *item) : m_item(item), m_api(QSGRendererInterface::Unknown), m_rootNode(nullptr), m_accDirty(0), m_asyncCallback(nullptr) { } - ~QQuickPathItemGenericRenderer(); + ~QQuickShapeGenericRenderer(); void beginSync(int totalCount) override; void setPath(int index, const QQuickPath *path) override; - void setJSPath(int index, const QQuickPathItemPath &path) override; + void setJSPath(int index, const QQuickShapePathCommands &path) override; void setStrokeColor(int index, const QColor &color) override; void setStrokeWidth(int index, qreal w) override; void setFillColor(int index, const QColor &color) override; - void setFillRule(int index, QQuickVisualPath::FillRule fillRule) override; - void setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) override; - void setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) override; - void setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) override; - void setFillGradient(int index, QQuickPathGradient *gradient) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; void endSync(bool async) override; void setAsyncCallback(void (*)(void *), void *) override; Flags flags() const override { return SupportsAsync; } void updateNode() override; - void setRootNode(QQuickPathItemGenericNode *node); + void setRootNode(QQuickShapeGenericNode *node); struct Color4ub { unsigned char r, g, b, a; }; typedef QVector<QSGGeometry::ColoredPoint2D> VertexContainerType; @@ -124,7 +124,7 @@ public: private: void maybeUpdateAsyncItem(); - struct VisualPathData { + struct ShapePathData { float strokeWidth; QPen pen; Color4ub strokeColor; @@ -132,31 +132,31 @@ private: Qt::FillRule fillRule; QPainterPath path; bool fillGradientActive; - QQuickPathItemGradientCache::GradientDesc fillGradient; + QQuickShapeGradientCache::GradientDesc fillGradient; VertexContainerType fillVertices; IndexContainerType fillIndices; QSGGeometry::Type indexType; VertexContainerType strokeVertices; int syncDirty; int effectiveDirty = 0; - QQuickPathItemFillRunnable *pendingFill = nullptr; - QQuickPathItemStrokeRunnable *pendingStroke = nullptr; + QQuickShapeFillRunnable *pendingFill = nullptr; + QQuickShapeStrokeRunnable *pendingStroke = nullptr; }; - void updateShadowDataInNode(VisualPathData *d, QQuickPathItemGenericStrokeFillNode *n); - void updateFillNode(VisualPathData *d, QQuickPathItemGenericNode *node); - void updateStrokeNode(VisualPathData *d, QQuickPathItemGenericNode *node); + void updateShadowDataInNode(ShapePathData *d, QQuickShapeGenericStrokeFillNode *n); + void updateFillNode(ShapePathData *d, QQuickShapeGenericNode *node); + void updateStrokeNode(ShapePathData *d, QQuickShapeGenericNode *node); QQuickItem *m_item; QSGRendererInterface::GraphicsApi m_api; - QQuickPathItemGenericNode *m_rootNode; - QVector<VisualPathData> m_vp; + QQuickShapeGenericNode *m_rootNode; + QVector<ShapePathData> m_sp; int m_accDirty; void (*m_asyncCallback)(void *); void *m_asyncCallbackData; }; -class QQuickPathItemFillRunnable : public QObject, public QRunnable +class QQuickShapeFillRunnable : public QObject, public QRunnable { Q_OBJECT @@ -167,19 +167,19 @@ public: // input QPainterPath path; - QQuickPathItemGenericRenderer::Color4ub fillColor; + QQuickShapeGenericRenderer::Color4ub fillColor; bool supportsElementIndexUint; // output - QQuickPathItemGenericRenderer::VertexContainerType fillVertices; - QQuickPathItemGenericRenderer::IndexContainerType fillIndices; + QQuickShapeGenericRenderer::VertexContainerType fillVertices; + QQuickShapeGenericRenderer::IndexContainerType fillIndices; QSGGeometry::Type indexType; Q_SIGNALS: - void done(QQuickPathItemFillRunnable *self); + void done(QQuickShapeFillRunnable *self); }; -class QQuickPathItemStrokeRunnable : public QObject, public QRunnable +class QQuickShapeStrokeRunnable : public QObject, public QRunnable { Q_OBJECT @@ -191,21 +191,21 @@ public: // input QPainterPath path; QPen pen; - QQuickPathItemGenericRenderer::Color4ub strokeColor; + QQuickShapeGenericRenderer::Color4ub strokeColor; QSize clipSize; // output - QQuickPathItemGenericRenderer::VertexContainerType strokeVertices; + QQuickShapeGenericRenderer::VertexContainerType strokeVertices; Q_SIGNALS: - void done(QQuickPathItemStrokeRunnable *self); + void done(QQuickShapeStrokeRunnable *self); }; -class QQuickPathItemGenericStrokeFillNode : public QSGGeometryNode +class QQuickShapeGenericStrokeFillNode : public QSGGeometryNode { public: - QQuickPathItemGenericStrokeFillNode(QQuickWindow *window); - ~QQuickPathItemGenericStrokeFillNode(); + QQuickShapeGenericStrokeFillNode(QQuickWindow *window); + ~QQuickShapeGenericStrokeFillNode(); enum Material { MatSolidColor, @@ -217,7 +217,7 @@ public: QQuickWindow *window() const { return m_window; } // shadow data for custom materials - QQuickPathItemGradientCache::GradientDesc m_fillGradient; + QQuickShapeGradientCache::GradientDesc m_fillGradient; private: QSGGeometry *m_geometry; @@ -226,30 +226,30 @@ private: QScopedPointer<QSGMaterial> m_solidColorMaterial; QScopedPointer<QSGMaterial> m_linearGradientMaterial; - friend class QQuickPathItemGenericRenderer; + friend class QQuickShapeGenericRenderer; }; -class QQuickPathItemGenericNode : public QSGNode +class QQuickShapeGenericNode : public QSGNode { public: - QQuickPathItemGenericStrokeFillNode *m_fillNode = nullptr; - QQuickPathItemGenericStrokeFillNode *m_strokeNode = nullptr; - QQuickPathItemGenericNode *m_next = nullptr; + QQuickShapeGenericStrokeFillNode *m_fillNode = nullptr; + QQuickShapeGenericStrokeFillNode *m_strokeNode = nullptr; + QQuickShapeGenericNode *m_next = nullptr; }; -class QQuickPathItemGenericMaterialFactory +class QQuickShapeGenericMaterialFactory { public: static QSGMaterial *createVertexColor(QQuickWindow *window); - static QSGMaterial *createLinearGradient(QQuickWindow *window, QQuickPathItemGenericStrokeFillNode *node); + static QSGMaterial *createLinearGradient(QQuickWindow *window, QQuickShapeGenericStrokeFillNode *node); }; #ifndef QT_NO_OPENGL -class QQuickPathItemLinearGradientShader : public QSGMaterialShader +class QQuickShapeLinearGradientShader : public QSGMaterialShader { public: - QQuickPathItemLinearGradientShader(); + QQuickShapeLinearGradientShader(); void initialize() override; void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override; @@ -264,40 +264,40 @@ private: int m_gradEndLoc; }; -class QQuickPathItemLinearGradientMaterial : public QSGMaterial +class QQuickShapeLinearGradientMaterial : public QSGMaterial { public: - QQuickPathItemLinearGradientMaterial(QQuickPathItemGenericStrokeFillNode *node) + QQuickShapeLinearGradientMaterial(QQuickShapeGenericStrokeFillNode *node) : m_node(node) { // Passing RequiresFullMatrix is essential in order to prevent the // batch renderer from baking in simple, translate-only transforms into // the vertex data. The shader will rely on the fact that - // vertexCoord.xy is the PathItem-space coordinate and so no modifications + // vertexCoord.xy is the Shape-space coordinate and so no modifications // are welcome. setFlag(Blending | RequiresFullMatrix); } QSGMaterialType *type() const override { - return &QQuickPathItemLinearGradientShader::type; + return &QQuickShapeLinearGradientShader::type; } int compare(const QSGMaterial *other) const override; QSGMaterialShader *createShader() const override { - return new QQuickPathItemLinearGradientShader; + return new QQuickShapeLinearGradientShader; } - QQuickPathItemGenericStrokeFillNode *node() const { return m_node; } + QQuickShapeGenericStrokeFillNode *node() const { return m_node; } private: - QQuickPathItemGenericStrokeFillNode *m_node; + QQuickShapeGenericStrokeFillNode *m_node; }; #endif // QT_NO_OPENGL QT_END_NAMESPACE -#endif // QQUICKPATHITEMGENERICRENDERER_P_H +#endif // QQUICKSHAPEGENERICRENDERER_P_H diff --git a/src/imports/pathitem/qquickpathitemnvprrenderer.cpp b/src/imports/shapes/qquickshapenvprrenderer.cpp index f8504f9985..a3e9d31be5 100644 --- a/src/imports/pathitem/qquickpathitemnvprrenderer.cpp +++ b/src/imports/shapes/qquickshapenvprrenderer.cpp @@ -37,7 +37,7 @@ ** ****************************************************************************/ -#include "qquickpathitemnvprrenderer_p.h" +#include "qquickshapenvprrenderer_p.h" #include <QOpenGLExtraFunctions> #include <QOpenGLFramebufferObject> #include <QOpenGLShaderProgram> @@ -46,98 +46,98 @@ QT_BEGIN_NAMESPACE -void QQuickPathItemNvprRenderer::beginSync(int totalCount) +void QQuickShapeNvprRenderer::beginSync(int totalCount) { - if (m_vp.count() != totalCount) { - m_vp.resize(totalCount); + if (m_sp.count() != totalCount) { + m_sp.resize(totalCount); m_accDirty |= DirtyList; } } -void QQuickPathItemNvprRenderer::setPath(int index, const QQuickPath *path) +void QQuickShapeNvprRenderer::setPath(int index, const QQuickPath *path) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); convertPath(path, &d); d.dirty |= DirtyPath; m_accDirty |= DirtyPath; } -void QQuickPathItemNvprRenderer::setJSPath(int index, const QQuickPathItemPath &path) +void QQuickShapeNvprRenderer::setJSPath(int index, const QQuickShapePathCommands &path) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); convertJSPath(path, &d); d.dirty |= DirtyPath; m_accDirty |= DirtyPath; } -void QQuickPathItemNvprRenderer::setStrokeColor(int index, const QColor &color) +void QQuickShapeNvprRenderer::setStrokeColor(int index, const QColor &color) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.strokeColor = color; d.dirty |= DirtyStyle; m_accDirty |= DirtyStyle; } -void QQuickPathItemNvprRenderer::setStrokeWidth(int index, qreal w) +void QQuickShapeNvprRenderer::setStrokeWidth(int index, qreal w) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.strokeWidth = w; d.dirty |= DirtyStyle; m_accDirty |= DirtyStyle; } -void QQuickPathItemNvprRenderer::setFillColor(int index, const QColor &color) +void QQuickShapeNvprRenderer::setFillColor(int index, const QColor &color) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.fillColor = color; d.dirty |= DirtyStyle; m_accDirty |= DirtyStyle; } -void QQuickPathItemNvprRenderer::setFillRule(int index, QQuickVisualPath::FillRule fillRule) +void QQuickShapeNvprRenderer::setFillRule(int index, QQuickShapePath::FillRule fillRule) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.fillRule = fillRule; d.dirty |= DirtyFillRule; m_accDirty |= DirtyFillRule; } -void QQuickPathItemNvprRenderer::setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) +void QQuickShapeNvprRenderer::setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.joinStyle = joinStyle; d.miterLimit = miterLimit; d.dirty |= DirtyStyle; m_accDirty |= DirtyStyle; } -void QQuickPathItemNvprRenderer::setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) +void QQuickShapeNvprRenderer::setCapStyle(int index, QQuickShapePath::CapStyle capStyle) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.capStyle = capStyle; d.dirty |= DirtyStyle; m_accDirty |= DirtyStyle; } -void QQuickPathItemNvprRenderer::setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, +void QQuickShapeNvprRenderer::setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) { - VisualPathGuiData &d(m_vp[index]); - d.dashActive = strokeStyle == QQuickVisualPath::DashLine; + ShapePathGuiData &d(m_sp[index]); + d.dashActive = strokeStyle == QQuickShapePath::DashLine; d.dashOffset = dashOffset; d.dashPattern = dashPattern; d.dirty |= DirtyDash; m_accDirty |= DirtyDash; } -void QQuickPathItemNvprRenderer::setFillGradient(int index, QQuickPathGradient *gradient) +void QQuickShapeNvprRenderer::setFillGradient(int index, QQuickShapeGradient *gradient) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.fillGradientActive = gradient != nullptr; if (gradient) { d.fillGradient.stops = gradient->sortedGradientStops(); d.fillGradient.spread = gradient->spread(); - if (QQuickPathLinearGradient *g = qobject_cast<QQuickPathLinearGradient *>(gradient)) { + if (QQuickShapeLinearGradient *g = qobject_cast<QQuickShapeLinearGradient *>(gradient)) { d.fillGradient.start = QPointF(g->x1(), g->y1()); d.fillGradient.end = QPointF(g->x2(), g->y2()); } else { @@ -148,11 +148,11 @@ void QQuickPathItemNvprRenderer::setFillGradient(int index, QQuickPathGradient * m_accDirty |= DirtyFillGradient; } -void QQuickPathItemNvprRenderer::endSync(bool) +void QQuickShapeNvprRenderer::endSync(bool) { } -void QQuickPathItemNvprRenderer::setNode(QQuickPathItemNvprRenderNode *node) +void QQuickShapeNvprRenderer::setNode(QQuickShapeNvprRenderNode *node) { if (m_node != node) { m_node = node; @@ -160,7 +160,7 @@ void QQuickPathItemNvprRenderer::setNode(QQuickPathItemNvprRenderNode *node) } } -QDebug operator<<(QDebug debug, const QQuickPathItemNvprRenderer::NvprPath &path) +QDebug operator<<(QDebug debug, const QQuickShapeNvprRenderer::NvprPath &path) { QDebugStateSaver saver(debug); debug.space().noquote(); @@ -229,7 +229,7 @@ static inline void appendControl2Coords(QVector<GLfloat> *v, QQuickPathCubic *c, v->append(p.y()); } -void QQuickPathItemNvprRenderer::convertPath(const QQuickPath *path, VisualPathGuiData *d) +void QQuickShapeNvprRenderer::convertPath(const QQuickPath *path, ShapePathGuiData *d) { d->path = NvprPath(); if (!path) @@ -283,7 +283,7 @@ void QQuickPathItemNvprRenderer::convertPath(const QQuickPath *path, VisualPathG d->path.str = QString(QStringLiteral("M %1 %2 ")).arg(pos.x()).arg(pos.y()).toUtf8(); d->path.str.append(o->path().toUtf8()); } else { - qWarning() << "PathItem/NVPR: unsupported Path element" << e; + qWarning() << "Shape/NVPR: unsupported Path element" << e; } } @@ -296,7 +296,7 @@ void QQuickPathItemNvprRenderer::convertPath(const QQuickPath *path, VisualPathG d->path.cmd.append(GL_CLOSE_PATH_NV); } -void QQuickPathItemNvprRenderer::convertJSPath(const QQuickPathItemPath &path, VisualPathGuiData *d) +void QQuickShapeNvprRenderer::convertJSPath(const QQuickShapePathCommands &path, ShapePathGuiData *d) { d->path = NvprPath(); if (path.cmd.isEmpty()) @@ -306,9 +306,9 @@ void QQuickPathItemNvprRenderer::convertJSPath(const QQuickPathItemPath &path, V QPointF pos(startPos); int coordIdx = 0; - for (QQuickPathItemPath::Command cmd : path.cmd) { + for (QQuickShapePathCommands::Command cmd : path.cmd) { switch (cmd) { - case QQuickPathItemPath::MoveTo: + case QQuickShapePathCommands::MoveTo: d->path.cmd.append(GL_MOVE_TO_NV); pos = QPointF(path.coords[coordIdx], path.coords[coordIdx + 1]); startPos = pos; @@ -316,14 +316,14 @@ void QQuickPathItemNvprRenderer::convertJSPath(const QQuickPathItemPath &path, V d->path.coord.append(pos.y()); coordIdx += 2; break; - case QQuickPathItemPath::LineTo: + case QQuickShapePathCommands::LineTo: d->path.cmd.append(GL_LINE_TO_NV); pos = QPointF(path.coords[coordIdx], path.coords[coordIdx + 1]); d->path.coord.append(pos.x()); d->path.coord.append(pos.y()); coordIdx += 2; break; - case QQuickPathItemPath::QuadTo: + case QQuickShapePathCommands::QuadTo: d->path.cmd.append(GL_QUADRATIC_CURVE_TO_NV); d->path.coord.append(path.coords[coordIdx]); d->path.coord.append(path.coords[coordIdx + 1]); @@ -332,7 +332,7 @@ void QQuickPathItemNvprRenderer::convertJSPath(const QQuickPathItemPath &path, V d->path.coord.append(pos.y()); coordIdx += 4; break; - case QQuickPathItemPath::CubicTo: + case QQuickShapePathCommands::CubicTo: d->path.cmd.append(GL_CUBIC_CURVE_TO_NV); d->path.coord.append(path.coords[coordIdx]); d->path.coord.append(path.coords[coordIdx + 1]); @@ -343,7 +343,7 @@ void QQuickPathItemNvprRenderer::convertJSPath(const QQuickPathItemPath &path, V d->path.coord.append(pos.y()); coordIdx += 6; break; - case QQuickPathItemPath::ArcTo: + case QQuickShapePathCommands::ArcTo: { const bool sweepFlag = !qFuzzyIsNull(path.coords[coordIdx + 5]); const bool useLargeArc = !qFuzzyIsNull(path.coords[coordIdx + 6]); @@ -378,7 +378,7 @@ static inline QVector4D qsg_premultiply(const QColor &c, float globalOpacity) return QVector4D(c.redF() * o, c.greenF() * o, c.blueF() * o, o); } -void QQuickPathItemNvprRenderer::updateNode() +void QQuickShapeNvprRenderer::updateNode() { // Called on the render thread with gui blocked -> update the node with its // own copy of all relevant data. @@ -386,14 +386,14 @@ void QQuickPathItemNvprRenderer::updateNode() if (!m_accDirty) return; - const int count = m_vp.count(); + const int count = m_sp.count(); const bool listChanged = m_accDirty & DirtyList; if (listChanged) - m_node->m_vp.resize(count); + m_node->m_sp.resize(count); for (int i = 0; i < count; ++i) { - VisualPathGuiData &src(m_vp[i]); - QQuickPathItemNvprRenderNode::VisualPathRenderData &dst(m_node->m_vp[i]); + ShapePathGuiData &src(m_sp[i]); + QQuickShapeNvprRenderNode::ShapePathRenderData &dst(m_node->m_sp[i]); int dirty = src.dirty; src.dirty = 0; @@ -412,13 +412,13 @@ void QQuickPathItemNvprRenderer::updateNode() dst.strokeColor = qsg_premultiply(src.strokeColor, 1.0f); dst.fillColor = qsg_premultiply(src.fillColor, 1.0f); switch (src.joinStyle) { - case QQuickVisualPath::MiterJoin: + case QQuickShapePath::MiterJoin: dst.joinStyle = GL_MITER_TRUNCATE_NV; break; - case QQuickVisualPath::BevelJoin: + case QQuickShapePath::BevelJoin: dst.joinStyle = GL_BEVEL_NV; break; - case QQuickVisualPath::RoundJoin: + case QQuickShapePath::RoundJoin: dst.joinStyle = GL_ROUND_NV; break; default: @@ -426,13 +426,13 @@ void QQuickPathItemNvprRenderer::updateNode() } dst.miterLimit = src.miterLimit; switch (src.capStyle) { - case QQuickVisualPath::FlatCap: + case QQuickShapePath::FlatCap: dst.capStyle = GL_FLAT; break; - case QQuickVisualPath::SquareCap: + case QQuickShapePath::SquareCap: dst.capStyle = GL_SQUARE_NV; break; - case QQuickVisualPath::RoundCap: + case QQuickShapePath::RoundCap: dst.capStyle = GL_ROUND_NV; break; default: @@ -442,10 +442,10 @@ void QQuickPathItemNvprRenderer::updateNode() if (dirty & DirtyFillRule) { switch (src.fillRule) { - case QQuickVisualPath::OddEvenFill: + case QQuickShapePath::OddEvenFill: dst.fillRule = GL_INVERT; break; - case QQuickVisualPath::WindingFill: + case QQuickShapePath::WindingFill: dst.fillRule = GL_COUNT_UP_NV; break; default: @@ -457,7 +457,7 @@ void QQuickPathItemNvprRenderer::updateNode() dst.dashOffset = src.dashOffset; if (src.dashActive) { dst.dashPattern.resize(src.dashPattern.count()); - // Multiply by strokeWidth because the PathItem API follows QPen + // Multiply by strokeWidth because the Shape API follows QPen // meaning the input dash pattern here is in width units. for (int i = 0; i < src.dashPattern.count(); ++i) dst.dashPattern[i] = GLfloat(src.dashPattern[i]) * src.strokeWidth; @@ -477,18 +477,18 @@ void QQuickPathItemNvprRenderer::updateNode() m_accDirty = 0; } -bool QQuickPathItemNvprRenderNode::nvprInited = false; -QQuickNvprFunctions QQuickPathItemNvprRenderNode::nvpr; -QQuickNvprMaterialManager QQuickPathItemNvprRenderNode::mtlmgr; +bool QQuickShapeNvprRenderNode::nvprInited = false; +QQuickNvprFunctions QQuickShapeNvprRenderNode::nvpr; +QQuickNvprMaterialManager QQuickShapeNvprRenderNode::mtlmgr; -QQuickPathItemNvprRenderNode::~QQuickPathItemNvprRenderNode() +QQuickShapeNvprRenderNode::~QQuickShapeNvprRenderNode() { releaseResources(); } -void QQuickPathItemNvprRenderNode::releaseResources() +void QQuickShapeNvprRenderNode::releaseResources() { - for (VisualPathRenderData &d : m_vp) { + for (ShapePathRenderData &d : m_sp) { if (d.path) { nvpr.deletePaths(d.path, 1); d.path = 0; @@ -579,9 +579,9 @@ QQuickNvprMaterialManager::MaterialDesc *QQuickNvprMaterialManager::activateMate return &mtl; } -void QQuickPathItemNvprRenderNode::updatePath(VisualPathRenderData *d) +void QQuickShapeNvprRenderNode::updatePath(ShapePathRenderData *d) { - if (d->dirty & QQuickPathItemNvprRenderer::DirtyPath) { + if (d->dirty & QQuickShapeNvprRenderer::DirtyPath) { if (!d->path) { d->path = nvpr.genPaths(1); Q_ASSERT(d->path != 0); @@ -594,7 +594,7 @@ void QQuickPathItemNvprRenderNode::updatePath(VisualPathRenderData *d) } } - if (d->dirty & QQuickPathItemNvprRenderer::DirtyStyle) { + if (d->dirty & QQuickShapeNvprRenderer::DirtyStyle) { nvpr.pathParameterf(d->path, GL_PATH_STROKE_WIDTH_NV, d->strokeWidth); nvpr.pathParameteri(d->path, GL_PATH_JOIN_STYLE_NV, d->joinStyle); nvpr.pathParameteri(d->path, GL_PATH_MITER_LIMIT_NV, d->miterLimit); @@ -602,7 +602,7 @@ void QQuickPathItemNvprRenderNode::updatePath(VisualPathRenderData *d) nvpr.pathParameteri(d->path, GL_PATH_DASH_CAPS_NV, d->capStyle); } - if (d->dirty & QQuickPathItemNvprRenderer::DirtyDash) { + if (d->dirty & QQuickShapeNvprRenderer::DirtyDash) { nvpr.pathParameterf(d->path, GL_PATH_DASH_OFFSET_NV, d->dashOffset); // count == 0 -> no dash nvpr.pathDashArray(d->path, d->dashPattern.count(), d->dashPattern.constData()); @@ -612,7 +612,7 @@ void QQuickPathItemNvprRenderNode::updatePath(VisualPathRenderData *d) d->fallbackValid = false; } -void QQuickPathItemNvprRenderNode::renderStroke(VisualPathRenderData *d, int strokeStencilValue, int writeMask) +void QQuickShapeNvprRenderNode::renderStroke(ShapePathRenderData *d, int strokeStencilValue, int writeMask) { QQuickNvprMaterialManager::MaterialDesc *mtl = mtlmgr.activateMaterial(QQuickNvprMaterialManager::MatSolid); f->glProgramUniform4f(mtl->prg, mtl->uniLoc[0], @@ -622,12 +622,12 @@ void QQuickPathItemNvprRenderNode::renderStroke(VisualPathRenderData *d, int str nvpr.stencilThenCoverStrokePath(d->path, strokeStencilValue, writeMask, GL_CONVEX_HULL_NV); } -void QQuickPathItemNvprRenderNode::renderFill(VisualPathRenderData *d) +void QQuickShapeNvprRenderNode::renderFill(ShapePathRenderData *d) { QQuickNvprMaterialManager::MaterialDesc *mtl = nullptr; if (d->fillGradientActive) { mtl = mtlmgr.activateMaterial(QQuickNvprMaterialManager::MatLinearGradient); - QSGTexture *tx = QQuickPathItemGradientCache::currentCache()->get(d->fillGradient); + QSGTexture *tx = QQuickShapeGradientCache::currentCache()->get(d->fillGradient); tx->bind(); // uv = vec2(coeff[0] * x + coeff[1] * y + coeff[2], coeff[3] * x + coeff[4] * y + coeff[5]) // where x and y are in path coordinate space, which is just what @@ -648,7 +648,7 @@ void QQuickPathItemNvprRenderNode::renderFill(VisualPathRenderData *d) nvpr.stencilThenCoverFillPath(d->path, d->fillRule, writeMask, GL_BOUNDING_BOX_NV); } -void QQuickPathItemNvprRenderNode::renderOffscreenFill(VisualPathRenderData *d) +void QQuickShapeNvprRenderNode::renderOffscreenFill(ShapePathRenderData *d) { if (d->fallbackValid && d->fallbackFbo) return; @@ -695,7 +695,7 @@ void QQuickPathItemNvprRenderNode::renderOffscreenFill(VisualPathRenderData *d) d->fallbackValid = true; } -void QQuickPathItemNvprRenderNode::setupStencilForCover(bool stencilClip, int sv) +void QQuickShapeNvprRenderNode::setupStencilForCover(bool stencilClip, int sv) { if (!stencilClip) { // Assume stencil buffer is cleared to 0 for each frame. @@ -708,7 +708,7 @@ void QQuickPathItemNvprRenderNode::setupStencilForCover(bool stencilClip, int sv } } -void QQuickPathItemNvprRenderNode::render(const RenderState *state) +void QQuickShapeNvprRenderNode::render(const RenderState *state) { f = QOpenGLContext::currentContext()->extraFunctions(); @@ -743,7 +743,7 @@ void QQuickPathItemNvprRenderNode::render(const RenderState *state) bool reloadMatrices = true; - for (VisualPathRenderData &d : m_vp) { + for (ShapePathRenderData &d : m_sp) { updatePath(&d); const bool hasFill = d.hasFill(); @@ -797,7 +797,7 @@ void QQuickPathItemNvprRenderNode::render(const RenderState *state) // With stencilCLip == true the read mask for the stencil test before the stencil step is 0x7F. // This assumes the clip stencil value is <= 127. if (sv >= strokeStencilValue) - qWarning("PathItem/NVPR: stencil clip ref value %d too large; expect rendering errors", sv); + qWarning("Shape/NVPR: stencil clip ref value %d too large; expect rendering errors", sv); } renderStroke(&d, strokeStencilValue, writeMask); @@ -812,17 +812,17 @@ void QQuickPathItemNvprRenderNode::render(const RenderState *state) f->glBindProgramPipeline(0); } -QSGRenderNode::StateFlags QQuickPathItemNvprRenderNode::changedStates() const +QSGRenderNode::StateFlags QQuickShapeNvprRenderNode::changedStates() const { return BlendState | StencilState | DepthState | ScissorState; } -QSGRenderNode::RenderingFlags QQuickPathItemNvprRenderNode::flags() const +QSGRenderNode::RenderingFlags QQuickShapeNvprRenderNode::flags() const { return DepthAwareRendering; // avoid hitting the less optimal no-opaque-batch path in the renderer } -bool QQuickPathItemNvprRenderNode::isSupported() +bool QQuickShapeNvprRenderNode::isSupported() { static const bool nvprDisabled = qEnvironmentVariableIntValue("QT_NO_NVPR") != 0; return !nvprDisabled && QQuickNvprFunctions::isSupported(); diff --git a/src/imports/pathitem/qquickpathitemnvprrenderer_p.h b/src/imports/shapes/qquickshapenvprrenderer_p.h index cfe1c7eab9..33007313d4 100644 --- a/src/imports/pathitem/qquickpathitemnvprrenderer_p.h +++ b/src/imports/shapes/qquickshapenvprrenderer_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QQUICKPATHITEMNVPRRENDERER_P_H -#define QQUICKPATHITEMNVPRRENDERER_P_H +#ifndef QQUICKSHAPENVPRRENDERER_P_H +#define QQUICKSHAPENVPRRENDERER_P_H // // W A R N I N G @@ -51,7 +51,7 @@ // We mean it. // -#include "qquickpathitem_p_p.h" +#include "qquickshape_p_p.h" #include "qquicknvprfunctions_p.h" #include <qsgrendernode.h> #include <QColor> @@ -62,12 +62,12 @@ QT_BEGIN_NAMESPACE -class QQuickPathItemNvprRenderNode; +class QQuickShapeNvprRenderNode; class QOpenGLFramebufferObject; class QOpenGLBuffer; class QOpenGLExtraFunctions; -class QQuickPathItemNvprRenderer : public QQuickAbstractPathRenderer +class QQuickShapeNvprRenderer : public QQuickAbstractPathRenderer { public: enum Dirty { @@ -81,21 +81,21 @@ public: void beginSync(int totalCount) override; void setPath(int index, const QQuickPath *path) override; - void setJSPath(int index, const QQuickPathItemPath &path) override; + void setJSPath(int index, const QQuickShapePathCommands &path) override; void setStrokeColor(int index, const QColor &color) override; void setStrokeWidth(int index, qreal w) override; void setFillColor(int index, const QColor &color) override; - void setFillRule(int index, QQuickVisualPath::FillRule fillRule) override; - void setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) override; - void setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) override; - void setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) override; - void setFillGradient(int index, QQuickPathGradient *gradient) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; void endSync(bool async) override; void updateNode() override; - void setNode(QQuickPathItemNvprRenderNode *node); + void setNode(QQuickShapeNvprRenderNode *node); struct NvprPath { QVector<GLubyte> cmd; @@ -104,33 +104,33 @@ public: }; private: - struct VisualPathGuiData { + struct ShapePathGuiData { int dirty = 0; NvprPath path; qreal strokeWidth; QColor strokeColor; QColor fillColor; - QQuickVisualPath::JoinStyle joinStyle; + QQuickShapePath::JoinStyle joinStyle; int miterLimit; - QQuickVisualPath::CapStyle capStyle; - QQuickVisualPath::FillRule fillRule; + QQuickShapePath::CapStyle capStyle; + QQuickShapePath::FillRule fillRule; bool dashActive; qreal dashOffset; QVector<qreal> dashPattern; bool fillGradientActive; - QQuickPathItemGradientCache::GradientDesc fillGradient; + QQuickShapeGradientCache::GradientDesc fillGradient; }; - void convertPath(const QQuickPath *path, VisualPathGuiData *d); - void convertJSPath(const QQuickPathItemPath &path, VisualPathGuiData *d); + void convertPath(const QQuickPath *path, ShapePathGuiData *d); + void convertJSPath(const QQuickShapePathCommands &path, ShapePathGuiData *d); - QQuickPathItemNvprRenderNode *m_node = nullptr; + QQuickShapeNvprRenderNode *m_node = nullptr; int m_accDirty = 0; - QVector<VisualPathGuiData> m_vp; + QVector<ShapePathGuiData> m_sp; }; -QDebug operator<<(QDebug debug, const QQuickPathItemNvprRenderer::NvprPath &path); +QDebug operator<<(QDebug debug, const QQuickShapeNvprRenderer::NvprPath &path); class QQuickNvprMaterialManager { @@ -175,10 +175,10 @@ private: QSize m_prevSize; }; -class QQuickPathItemNvprRenderNode : public QSGRenderNode +class QQuickShapeNvprRenderNode : public QSGRenderNode { public: - ~QQuickPathItemNvprRenderNode(); + ~QQuickShapeNvprRenderNode(); void render(const RenderState *state) override; void releaseResources() override; @@ -188,10 +188,10 @@ public: static bool isSupported(); private: - struct VisualPathRenderData { + struct ShapePathRenderData { GLuint path = 0; int dirty = 0; - QQuickPathItemNvprRenderer::NvprPath source; + QQuickShapeNvprRenderer::NvprPath source; GLfloat strokeWidth; QVector4D strokeColor; QVector4D fillColor; @@ -202,7 +202,7 @@ private: GLfloat dashOffset; QVector<GLfloat> dashPattern; bool fillGradientActive; - QQuickPathItemGradientCache::GradientDesc fillGradient; + QQuickShapeGradientCache::GradientDesc fillGradient; QOpenGLFramebufferObject *fallbackFbo = nullptr; bool fallbackValid = false; QSize fallbackSize; @@ -212,10 +212,10 @@ private: bool hasStroke() const { return strokeWidth >= 0.0f && !qFuzzyIsNull(strokeColor.w()); } }; - void updatePath(VisualPathRenderData *d); - void renderStroke(VisualPathRenderData *d, int strokeStencilValue, int writeMask); - void renderFill(VisualPathRenderData *d); - void renderOffscreenFill(VisualPathRenderData *d); + void updatePath(ShapePathRenderData *d); + void renderStroke(ShapePathRenderData *d, int strokeStencilValue, int writeMask); + void renderFill(ShapePathRenderData *d); + void renderOffscreenFill(ShapePathRenderData *d); void setupStencilForCover(bool stencilClip, int sv); static bool nvprInited; @@ -225,13 +225,13 @@ private: QQuickNvprBlitter m_fallbackBlitter; QOpenGLExtraFunctions *f = nullptr; - QVector<VisualPathRenderData> m_vp; + QVector<ShapePathRenderData> m_sp; - friend class QQuickPathItemNvprRenderer; + friend class QQuickShapeNvprRenderer; }; QT_END_NAMESPACE #endif // QT_NO_OPENGL -#endif // QQUICKPATHITEMNVPRRENDERER_P_H +#endif // QQUICKSHAPENVPRRENDERER_P_H diff --git a/src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp b/src/imports/shapes/qquickshapesoftwarerenderer.cpp index b7aa93bf65..33d80be22c 100644 --- a/src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp +++ b/src/imports/shapes/qquickshapesoftwarerenderer.cpp @@ -37,46 +37,46 @@ ** ****************************************************************************/ -#include "qquickpathitemsoftwarerenderer_p.h" +#include "qquickshapesoftwarerenderer_p.h" #include <private/qquickpath_p_p.h> QT_BEGIN_NAMESPACE -void QQuickPathItemSoftwareRenderer::beginSync(int totalCount) +void QQuickShapeSoftwareRenderer::beginSync(int totalCount) { - if (m_vp.count() != totalCount) { - m_vp.resize(totalCount); + if (m_sp.count() != totalCount) { + m_sp.resize(totalCount); m_accDirty |= DirtyList; } } -void QQuickPathItemSoftwareRenderer::setPath(int index, const QQuickPath *path) +void QQuickShapeSoftwareRenderer::setPath(int index, const QQuickPath *path) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.path = path ? path->path() : QPainterPath(); d.dirty |= DirtyPath; m_accDirty |= DirtyPath; } -void QQuickPathItemSoftwareRenderer::setJSPath(int index, const QQuickPathItemPath &path) +void QQuickShapeSoftwareRenderer::setJSPath(int index, const QQuickShapePathCommands &path) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.path = path.toPainterPath(); d.dirty |= DirtyPath; m_accDirty |= DirtyPath; } -void QQuickPathItemSoftwareRenderer::setStrokeColor(int index, const QColor &color) +void QQuickShapeSoftwareRenderer::setStrokeColor(int index, const QColor &color) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.pen.setColor(color); d.dirty |= DirtyPen; m_accDirty |= DirtyPen; } -void QQuickPathItemSoftwareRenderer::setStrokeWidth(int index, qreal w) +void QQuickShapeSoftwareRenderer::setStrokeWidth(int index, qreal w) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.strokeWidth = w; if (w >= 0.0f) d.pen.setWidthF(w); @@ -84,49 +84,49 @@ void QQuickPathItemSoftwareRenderer::setStrokeWidth(int index, qreal w) m_accDirty |= DirtyPen; } -void QQuickPathItemSoftwareRenderer::setFillColor(int index, const QColor &color) +void QQuickShapeSoftwareRenderer::setFillColor(int index, const QColor &color) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.fillColor = color; d.brush.setColor(color); d.dirty |= DirtyBrush; m_accDirty |= DirtyBrush; } -void QQuickPathItemSoftwareRenderer::setFillRule(int index, QQuickVisualPath::FillRule fillRule) +void QQuickShapeSoftwareRenderer::setFillRule(int index, QQuickShapePath::FillRule fillRule) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.fillRule = Qt::FillRule(fillRule); d.dirty |= DirtyFillRule; m_accDirty |= DirtyFillRule; } -void QQuickPathItemSoftwareRenderer::setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) +void QQuickShapeSoftwareRenderer::setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.pen.setJoinStyle(Qt::PenJoinStyle(joinStyle)); d.pen.setMiterLimit(miterLimit); d.dirty |= DirtyPen; m_accDirty |= DirtyPen; } -void QQuickPathItemSoftwareRenderer::setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) +void QQuickShapeSoftwareRenderer::setCapStyle(int index, QQuickShapePath::CapStyle capStyle) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); d.pen.setCapStyle(Qt::PenCapStyle(capStyle)); d.dirty |= DirtyPen; m_accDirty |= DirtyPen; } -void QQuickPathItemSoftwareRenderer::setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, +void QQuickShapeSoftwareRenderer::setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) { - VisualPathGuiData &d(m_vp[index]); + ShapePathGuiData &d(m_sp[index]); switch (strokeStyle) { - case QQuickVisualPath::SolidLine: + case QQuickShapePath::SolidLine: d.pen.setStyle(Qt::SolidLine); break; - case QQuickVisualPath::DashLine: + case QQuickShapePath::DashLine: d.pen.setStyle(Qt::CustomDashLine); d.pen.setDashPattern(dashPattern); d.pen.setDashOffset(dashOffset); @@ -138,21 +138,21 @@ void QQuickPathItemSoftwareRenderer::setStrokeStyle(int index, QQuickVisualPath: m_accDirty |= DirtyPen; } -void QQuickPathItemSoftwareRenderer::setFillGradient(int index, QQuickPathGradient *gradient) +void QQuickShapeSoftwareRenderer::setFillGradient(int index, QQuickShapeGradient *gradient) { - VisualPathGuiData &d(m_vp[index]); - if (QQuickPathLinearGradient *linearGradient = qobject_cast<QQuickPathLinearGradient *>(gradient)) { + ShapePathGuiData &d(m_sp[index]); + if (QQuickShapeLinearGradient *linearGradient = qobject_cast<QQuickShapeLinearGradient *>(gradient)) { QLinearGradient painterGradient(linearGradient->x1(), linearGradient->y1(), linearGradient->x2(), linearGradient->y2()); painterGradient.setStops(linearGradient->sortedGradientStops()); switch (gradient->spread()) { - case QQuickPathGradient::PadSpread: + case QQuickShapeGradient::PadSpread: painterGradient.setSpread(QGradient::PadSpread); break; - case QQuickPathGradient::RepeatSpread: + case QQuickShapeGradient::RepeatSpread: painterGradient.setSpread(QGradient::RepeatSpread); break; - case QQuickPathGradient::ReflectSpread: + case QQuickShapeGradient::ReflectSpread: painterGradient.setSpread(QGradient::ReflectSpread); break; default: @@ -166,11 +166,11 @@ void QQuickPathItemSoftwareRenderer::setFillGradient(int index, QQuickPathGradie m_accDirty |= DirtyBrush; } -void QQuickPathItemSoftwareRenderer::endSync(bool) +void QQuickShapeSoftwareRenderer::endSync(bool) { } -void QQuickPathItemSoftwareRenderer::setNode(QQuickPathItemSoftwareRenderNode *node) +void QQuickShapeSoftwareRenderer::setNode(QQuickShapeSoftwareRenderNode *node) { if (m_node != node) { m_node = node; @@ -178,21 +178,21 @@ void QQuickPathItemSoftwareRenderer::setNode(QQuickPathItemSoftwareRenderNode *n } } -void QQuickPathItemSoftwareRenderer::updateNode() +void QQuickShapeSoftwareRenderer::updateNode() { if (!m_accDirty) return; - const int count = m_vp.count(); + const int count = m_sp.count(); const bool listChanged = m_accDirty & DirtyList; if (listChanged) - m_node->m_vp.resize(count); + m_node->m_sp.resize(count); m_node->m_boundingRect = QRectF(); for (int i = 0; i < count; ++i) { - VisualPathGuiData &src(m_vp[i]); - QQuickPathItemSoftwareRenderNode::VisualPathRenderData &dst(m_node->m_vp[i]); + ShapePathGuiData &src(m_sp[i]); + QQuickShapeSoftwareRenderNode::ShapePathRenderData &dst(m_node->m_sp[i]); if (listChanged || (src.dirty & DirtyPath)) { dst.path = src.path; @@ -222,23 +222,23 @@ void QQuickPathItemSoftwareRenderer::updateNode() m_accDirty = 0; } -QQuickPathItemSoftwareRenderNode::QQuickPathItemSoftwareRenderNode(QQuickPathItem *item) +QQuickShapeSoftwareRenderNode::QQuickShapeSoftwareRenderNode(QQuickShape *item) : m_item(item) { } -QQuickPathItemSoftwareRenderNode::~QQuickPathItemSoftwareRenderNode() +QQuickShapeSoftwareRenderNode::~QQuickShapeSoftwareRenderNode() { releaseResources(); } -void QQuickPathItemSoftwareRenderNode::releaseResources() +void QQuickShapeSoftwareRenderNode::releaseResources() { } -void QQuickPathItemSoftwareRenderNode::render(const RenderState *state) +void QQuickShapeSoftwareRenderNode::render(const RenderState *state) { - if (m_vp.isEmpty()) + if (m_sp.isEmpty()) return; QSGRendererInterface *rif = m_item->window()->rendererInterface(); @@ -252,24 +252,24 @@ void QQuickPathItemSoftwareRenderNode::render(const RenderState *state) p->setTransform(matrix()->toTransform()); p->setOpacity(inheritedOpacity()); - for (const VisualPathRenderData &d : qAsConst(m_vp)) { + for (const ShapePathRenderData &d : qAsConst(m_sp)) { p->setPen(d.strokeWidth >= 0.0f && d.pen.color() != Qt::transparent ? d.pen : Qt::NoPen); p->setBrush(d.brush.color() != Qt::transparent ? d.brush : Qt::NoBrush); p->drawPath(d.path); } } -QSGRenderNode::StateFlags QQuickPathItemSoftwareRenderNode::changedStates() const +QSGRenderNode::StateFlags QQuickShapeSoftwareRenderNode::changedStates() const { return 0; } -QSGRenderNode::RenderingFlags QQuickPathItemSoftwareRenderNode::flags() const +QSGRenderNode::RenderingFlags QQuickShapeSoftwareRenderNode::flags() const { return BoundedRectRendering; // avoid fullscreen updates by saying we won't draw outside rect() } -QRectF QQuickPathItemSoftwareRenderNode::rect() const +QRectF QQuickShapeSoftwareRenderNode::rect() const { return m_boundingRect; } diff --git a/src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h b/src/imports/shapes/qquickshapesoftwarerenderer_p.h index e76590bdfe..53982ce347 100644 --- a/src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h +++ b/src/imports/shapes/qquickshapesoftwarerenderer_p.h @@ -37,8 +37,8 @@ ** ****************************************************************************/ -#ifndef QQUICKPATHITEMSOFTWARERENDERER_P_H -#define QQUICKPATHITEMSOFTWARERENDERER_P_H +#ifndef QQUICKSHAPESOFTWARERENDERER_P_H +#define QQUICKSHAPESOFTWARERENDERER_P_H // // W A R N I N G @@ -51,16 +51,16 @@ // We mean it. // -#include "qquickpathitem_p_p.h" +#include "qquickshape_p_p.h" #include <qsgrendernode.h> #include <QPen> #include <QBrush> QT_BEGIN_NAMESPACE -class QQuickPathItemSoftwareRenderNode; +class QQuickShapeSoftwareRenderNode; -class QQuickPathItemSoftwareRenderer : public QQuickAbstractPathRenderer +class QQuickShapeSoftwareRenderer : public QQuickAbstractPathRenderer { public: enum Dirty { @@ -73,26 +73,26 @@ public: void beginSync(int totalCount) override; void setPath(int index, const QQuickPath *path) override; - void setJSPath(int index, const QQuickPathItemPath &path) override; + void setJSPath(int index, const QQuickShapePathCommands &path) override; void setStrokeColor(int index, const QColor &color) override; void setStrokeWidth(int index, qreal w) override; void setFillColor(int index, const QColor &color) override; - void setFillRule(int index, QQuickVisualPath::FillRule fillRule) override; - void setJoinStyle(int index, QQuickVisualPath::JoinStyle joinStyle, int miterLimit) override; - void setCapStyle(int index, QQuickVisualPath::CapStyle capStyle) override; - void setStrokeStyle(int index, QQuickVisualPath::StrokeStyle strokeStyle, + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, qreal dashOffset, const QVector<qreal> &dashPattern) override; - void setFillGradient(int index, QQuickPathGradient *gradient) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; void endSync(bool async) override; void updateNode() override; - void setNode(QQuickPathItemSoftwareRenderNode *node); + void setNode(QQuickShapeSoftwareRenderNode *node); private: - QQuickPathItemSoftwareRenderNode *m_node = nullptr; + QQuickShapeSoftwareRenderNode *m_node = nullptr; int m_accDirty = 0; - struct VisualPathGuiData { + struct ShapePathGuiData { int dirty = 0; QPainterPath path; QPen pen; @@ -101,14 +101,14 @@ private: QBrush brush; Qt::FillRule fillRule; }; - QVector<VisualPathGuiData> m_vp; + QVector<ShapePathGuiData> m_sp; }; -class QQuickPathItemSoftwareRenderNode : public QSGRenderNode +class QQuickShapeSoftwareRenderNode : public QSGRenderNode { public: - QQuickPathItemSoftwareRenderNode(QQuickPathItem *item); - ~QQuickPathItemSoftwareRenderNode(); + QQuickShapeSoftwareRenderNode(QQuickShape *item); + ~QQuickShapeSoftwareRenderNode(); void render(const RenderState *state) override; void releaseResources() override; @@ -117,20 +117,20 @@ public: QRectF rect() const override; private: - QQuickPathItem *m_item; + QQuickShape *m_item; - struct VisualPathRenderData { + struct ShapePathRenderData { QPainterPath path; QPen pen; float strokeWidth; QBrush brush; }; - QVector<VisualPathRenderData> m_vp; + QVector<ShapePathRenderData> m_sp; QRectF m_boundingRect; - friend class QQuickPathItemSoftwareRenderer; + friend class QQuickShapeSoftwareRenderer; }; QT_END_NAMESPACE -#endif // QQUICKPATHITEMSOFTWARERENDERER_P_H +#endif // QQUICKSHAPESOFTWARERENDERER_P_H diff --git a/src/imports/shapes/shapes.pro b/src/imports/shapes/shapes.pro new file mode 100644 index 0000000000..80e6a22142 --- /dev/null +++ b/src/imports/shapes/shapes.pro @@ -0,0 +1,31 @@ +CXX_MODULE = qml +TARGET = qmlshapesplugin +TARGETPATH = QtQuick/Shapes +IMPORT_VERSION = 1.0 + +QT = core gui qml quick quick-private + +HEADERS += \ + qquickshape_p.h \ + qquickshape_p_p.h \ + qquickshapegenericrenderer_p.h \ + qquickshapesoftwarerenderer_p.h + +SOURCES += \ + plugin.cpp \ + qquickshape.cpp \ + qquickshapegenericrenderer.cpp \ + qquickshapesoftwarerenderer.cpp + +qtConfig(opengl) { + HEADERS += \ + qquicknvprfunctions_p.h \ + qquicknvprfunctions_p_p.h \ + qquickshapenvprrenderer_p.h + + SOURCES += \ + qquicknvprfunctions.cpp \ + qquickshapenvprrenderer.cpp +} + +load(qml_plugin) diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp index 84441e308f..085963be6c 100644 --- a/src/quick/util/qquickpath.cpp +++ b/src/quick/util/qquickpath.cpp @@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE \instantiates QQuickPath \inqmlmodule QtQuick \ingroup qtquick-animation-paths - \brief Defines a path for use by \l PathView and \l PathItem + \brief Defines a path for use by \l PathView and \l Shape A Path is composed of one or more path segments - PathLine, PathQuad, PathCubic, PathArc, PathCurve, PathSvg. @@ -80,16 +80,16 @@ QT_BEGIN_NAMESPACE along the path. Path and the other types for specifying path elements are shared between - \l PathView and \l PathItem. The following table provides an overview of the + \l PathView and \l Shape. The following table provides an overview of the applicability of the various path elements: \table \header \li Element \li PathView - \li PathItem - \li PathItem, GL_NV_path_rendering - \li PathItem, software + \li Shape + \li Shape, GL_NV_path_rendering + \li Shape, software \row \li PathMove \li N/A @@ -146,7 +146,7 @@ QT_BEGIN_NAMESPACE \li No \endtable - \sa PathView, PathItem, PathAttribute, PathPercent, PathLine, PathMove, PathQuad, PathCubic, PathArc, PathCurve, PathSvg + \sa PathView, Shape, PathAttribute, PathPercent, PathLine, PathMove, PathQuad, PathCubic, PathArc, PathCurve, PathSvg */ QQuickPath::QQuickPath(QObject *parent) : QObject(*(new QQuickPathPrivate), parent) @@ -1119,7 +1119,7 @@ void QQuickPathLine::addToPath(QPainterPath &path, const QQuickPathData &data) \ingroup qtquick-animation-paths \brief Moves the Path's position - While not relevant with PathView, for Path elements used with PathItem it + While not relevant with PathView, for Path elements used with Shape it is important to distinguish between the operations of drawing a straight line and moving the path position without drawing anything. @@ -1927,7 +1927,7 @@ void QQuickPathArc::addToPath(QPainterPath &path, const QQuickPathData &data) \note Mixing PathSvg with other type of elements is not always supported, therefore it is strongly recommended to avoid this. For example, when - \l PathItem is backed by \c{GL_NV_path_rendering}, a Path can contain one or + \l Shape is backed by \c{GL_NV_path_rendering}, a Path can contain one or more PathSvg elements, or one or more other type of elements, but not both. \sa Path, PathLine, PathQuad, PathCubic, PathArc, PathCurve diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index c835af55ad..d35a2e971a 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -86,8 +86,8 @@ tst_examples::tst_examples() excludedDirs << "snippets/qml/visualdatamodel_rootindex"; excludedDirs << "snippets/qml/qtbinding"; excludedDirs << "snippets/qml/imports"; - excludedFiles << "examples/quick/pathitem/content/pathitem.qml"; // relies on resources - excludedFiles << "examples/quick/pathitem/content/pathiteminteract.qml"; // relies on resources + excludedFiles << "examples/quick/shapes/content/pathitem.qml"; // relies on resources + excludedFiles << "examples/quick/shapes/content/pathiteminteract.qml"; // relies on resources #ifdef QT_NO_XMLPATTERNS excludedDirs << "demos/twitter"; diff --git a/tests/auto/quick/qquickpathitem/qquickpathitem.pro b/tests/auto/quick/qquickpathitem/qquickpathitem.pro deleted file mode 100644 index 4b70a38436..0000000000 --- a/tests/auto/quick/qquickpathitem/qquickpathitem.pro +++ /dev/null @@ -1,35 +0,0 @@ -CONFIG += testcase -TARGET = tst_qquickpathitem -macx:CONFIG -= app_bundle - -SOURCES += tst_qquickpathitem.cpp - -include (../../shared/util.pri) -include (../shared/util.pri) - -TESTDATA = data/* - -HEADERS += \ - ../../../../src/imports/pathitem/qquickpathitem_p.h \ - ../../../../src/imports/pathitem/qquickpathitem_p_p.h \ - ../../../../src/imports/pathitem/qquickpathitemgenericrenderer_p.h \ - ../../../../src/imports/pathitem/qquickpathitemsoftwarerenderer_p.h - -SOURCES += \ - ../../../../src/imports/pathitem/qquickpathitem.cpp \ - ../../../../src/imports/pathitem/qquickpathitemgenericrenderer.cpp \ - ../../../../src/imports/pathitem/qquickpathitemsoftwarerenderer.cpp - -qtConfig(opengl) { - HEADERS += \ - ../../../../src/imports/pathitem/qquicknvprfunctions_p.h \ - ../../../../src/imports/pathitem/qquicknvprfunctions_p_p.h \ - ../../../../src/imports/pathitem/qquickpathitemnvprrenderer_p.h - - SOURCES += \ - ../../../../src/imports/pathitem/qquicknvprfunctions.cpp \ - ../../../../src/imports/pathitem/qquickpathitemnvprrenderer.cpp -} - -QT += core-private gui-private qml-private quick-private testlib -qtHaveModule(widgets): QT += widgets diff --git a/tests/auto/quick/qquickpathitem/data/pathitem1.qml b/tests/auto/quick/qquickshape/data/pathitem1.qml index d4bc133d86..29ca67b0bb 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem1.qml +++ b/tests/auto/quick/qquickshape/data/pathitem1.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 import tst_qquickpathitem 1.0 -PathItem { +Shape { } diff --git a/tests/auto/quick/qquickpathitem/data/pathitem2.qml b/tests/auto/quick/qquickshape/data/pathitem2.qml index fcef43a4fe..a255a37af6 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem2.qml +++ b/tests/auto/quick/qquickshape/data/pathitem2.qml @@ -1,7 +1,7 @@ import QtQuick 2.9 import tst_qquickpathitem 1.0 -PathItem { - VisualPath { } - VisualPath { } +Shape { + ShapePath { } + ShapePath { } } diff --git a/tests/auto/quick/qquickpathitem/data/pathitem3.png b/tests/auto/quick/qquickshape/data/pathitem3.png Binary files differindex a8b4483c96..a8b4483c96 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem3.png +++ b/tests/auto/quick/qquickshape/data/pathitem3.png diff --git a/tests/auto/quick/qquickpathitem/data/pathitem3.qml b/tests/auto/quick/qquickshape/data/pathitem3.qml index 3d2b9f6229..12bfa1bb5f 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem3.qml +++ b/tests/auto/quick/qquickshape/data/pathitem3.qml @@ -5,24 +5,24 @@ Item { width: 200 height: 150 - PathItem { + Shape { enableVendorExtensions: false objectName: "pathItem" anchors.fill: parent - VisualPath { + ShapePath { strokeWidth: 4 strokeColor: "red" - fillGradient: PathLinearGradient { + fillGradient: ShapeLinearGradient { x1: 20; y1: 20 x2: 180; y2: 130 - PathGradientStop { position: 0; color: "blue" } - PathGradientStop { position: 0.2; color: "green" } - PathGradientStop { position: 0.4; color: "red" } - PathGradientStop { position: 0.6; color: "yellow" } - PathGradientStop { position: 1; color: "cyan" } + ShapeGradientStop { position: 0; color: "blue" } + ShapeGradientStop { position: 0.2; color: "green" } + ShapeGradientStop { position: 0.4; color: "red" } + ShapeGradientStop { position: 0.6; color: "yellow" } + ShapeGradientStop { position: 1; color: "cyan" } } - strokeStyle: VisualPath.DashLine + strokeStyle: ShapePath.DashLine dashPattern: [ 1, 4 ] Path { startX: 20; startY: 20 diff --git a/tests/auto/quick/qquickpathitem/data/pathitem4.png b/tests/auto/quick/qquickshape/data/pathitem4.png Binary files differindex 3a988ba249..3a988ba249 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem4.png +++ b/tests/auto/quick/qquickshape/data/pathitem4.png diff --git a/tests/auto/quick/qquickpathitem/data/pathitem4.qml b/tests/auto/quick/qquickshape/data/pathitem4.qml index 3f756336c4..7d9ed4b84e 100644 --- a/tests/auto/quick/qquickpathitem/data/pathitem4.qml +++ b/tests/auto/quick/qquickshape/data/pathitem4.qml @@ -5,12 +5,12 @@ Item { width: 200 height: 150 - PathItem { + Shape { enableVendorExtensions: false objectName: "pathItem" anchors.fill: parent - VisualPath { + ShapePath { strokeColor: "red" fillColor: "green" Path { @@ -21,7 +21,7 @@ Item { } } - VisualPath { + ShapePath { strokeWidth: 10 fillColor: "transparent" strokeColor: "blue" @@ -31,11 +31,11 @@ Item { } } - VisualPath { - fillGradient: PathLinearGradient { + ShapePath { + fillGradient: ShapeLinearGradient { y2: 150 - PathGradientStop { position: 0; color: "yellow" } - PathGradientStop { position: 1; color: "green" } + ShapeGradientStop { position: 0; color: "yellow" } + ShapeGradientStop { position: 1; color: "green" } } Path { diff --git a/tests/auto/quick/qquickshape/qquickshape.pro b/tests/auto/quick/qquickshape/qquickshape.pro new file mode 100644 index 0000000000..29c3502b86 --- /dev/null +++ b/tests/auto/quick/qquickshape/qquickshape.pro @@ -0,0 +1,35 @@ +CONFIG += testcase +TARGET = tst_qquickshape +macos:CONFIG -= app_bundle + +SOURCES += tst_qquickshape.cpp + +include (../../shared/util.pri) +include (../shared/util.pri) + +TESTDATA = data/* + +HEADERS += \ + ../../../../src/imports/shapes/qquickshape_p.h \ + ../../../../src/imports/shapes/qquickshape_p_p.h \ + ../../../../src/imports/shapes/qquickshapegenericrenderer_p.h \ + ../../../../src/imports/shapes/qquickshapesoftwarerenderer_p.h + +SOURCES += \ + ../../../../src/imports/shapes/qquickshape.cpp \ + ../../../../src/imports/shapes/qquickshapegenericrenderer.cpp \ + ../../../../src/imports/shapes/qquickshapesoftwarerenderer.cpp + +qtConfig(opengl) { + HEADERS += \ + ../../../../src/imports/shapes/qquicknvprfunctions_p.h \ + ../../../../src/imports/shapes/qquicknvprfunctions_p_p.h \ + ../../../../src/imports/shapes/qquickshapenvprrenderer_p.h + + SOURCES += \ + ../../../../src/imports/shapes/qquicknvprfunctions.cpp \ + ../../../../src/imports/shapes/qquickshapenvprrenderer.cpp +} + +QT += core-private gui-private qml-private quick-private testlib +qtHaveModule(widgets): QT += widgets diff --git a/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp index 230d82a864..56d891d87e 100644 --- a/tests/auto/quick/qquickpathitem/tst_qquickpathitem.cpp +++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp @@ -33,7 +33,7 @@ #include <QtQml/qqmlcontext.h> #include <QtQml/qqmlexpression.h> #include <QtQml/qqmlincubator.h> -#include "../../../../src/imports/pathitem/qquickpathitem_p.h" +#include "../../../../src/imports/shapes/qquickshape_p.h" #include "../../shared/util.h" #include "../shared/viewtestutil.h" @@ -42,76 +42,76 @@ using namespace QQuickViewTestUtil; using namespace QQuickVisualTestUtil; -class tst_QQuickPathItem : public QQmlDataTest +class tst_QQuickShape : public QQmlDataTest { Q_OBJECT public: - tst_QQuickPathItem(); + tst_QQuickShape(); private slots: void initValues(); void vpInitValues(); - void basicPathItem(); + void basicShape(); void changeSignals(); void render(); - void renderWithMultipleVp(); + void renderWithMultipleSp(); }; -tst_QQuickPathItem::tst_QQuickPathItem() +tst_QQuickShape::tst_QQuickShape() { // Force the software backend to get reliable rendering results regardless of the hw and drivers. QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software); const char *uri = "tst_qquickpathitem"; - qmlRegisterType<QQuickPathItem>(uri, 1, 0, "PathItem"); - qmlRegisterType<QQuickVisualPath>(uri, 1, 0, "VisualPath"); - qmlRegisterType<QQuickPathGradientStop>(uri, 1, 0, "PathGradientStop"); - qmlRegisterUncreatableType<QQuickPathGradient>(uri, 1, 0, "PathGradient", QQuickPathGradient::tr("PathGradient is an abstract base class")); - qmlRegisterType<QQuickPathLinearGradient>(uri, 1, 0, "PathLinearGradient"); + qmlRegisterType<QQuickShape>(uri, 1, 0, "Shape"); + qmlRegisterType<QQuickShapePath>(uri, 1, 0, "ShapePath"); + qmlRegisterType<QQuickShapeGradientStop>(uri, 1, 0, "ShapeGradientStop"); + qmlRegisterUncreatableType<QQuickShapeGradient>(uri, 1, 0, "ShapeGradient", QQuickShapeGradient::tr("ShapeGradient is an abstract base class")); + qmlRegisterType<QQuickShapeLinearGradient>(uri, 1, 0, "ShapeLinearGradient"); } -void tst_QQuickPathItem::initValues() +void tst_QQuickShape::initValues() { QQmlEngine engine; QQmlComponent c(&engine, testFileUrl("pathitem1.qml")); - QQuickPathItem *obj = qobject_cast<QQuickPathItem *>(c.create()); + QQuickShape *obj = qobject_cast<QQuickShape *>(c.create()); QVERIFY(obj != nullptr); - QVERIFY(obj->rendererType() == QQuickPathItem::UnknownRenderer); + QVERIFY(obj->rendererType() == QQuickShape::UnknownRenderer); QVERIFY(!obj->asynchronous()); QVERIFY(obj->enableVendorExtensions()); - QVERIFY(obj->status() == QQuickPathItem::Null); + QVERIFY(obj->status() == QQuickShape::Null); auto vps = obj->elements(); QVERIFY(vps.count(&vps) == 0); delete obj; } -void tst_QQuickPathItem::vpInitValues() +void tst_QQuickShape::vpInitValues() { QQmlEngine engine; QQmlComponent c(&engine, testFileUrl("pathitem2.qml")); - QQuickPathItem *obj = qobject_cast<QQuickPathItem *>(c.create()); + QQuickShape *obj = qobject_cast<QQuickShape *>(c.create()); QVERIFY(obj != nullptr); - QVERIFY(obj->rendererType() == QQuickPathItem::UnknownRenderer); + QVERIFY(obj->rendererType() == QQuickShape::UnknownRenderer); QVERIFY(!obj->asynchronous()); QVERIFY(obj->enableVendorExtensions()); - QVERIFY(obj->status() == QQuickPathItem::Null); + QVERIFY(obj->status() == QQuickShape::Null); auto vps = obj->elements(); QVERIFY(vps.count(&vps) == 2); - QQuickVisualPath *vp = vps.at(&vps, 0); + QQuickShapePath *vp = vps.at(&vps, 0); QVERIFY(vp != nullptr); QVERIFY(!vp->path()); QCOMPARE(vp->strokeColor(), QColor(Qt::white)); QCOMPARE(vp->strokeWidth(), 1.0f); QCOMPARE(vp->fillColor(), QColor(Qt::white)); - QCOMPARE(vp->fillRule(), QQuickVisualPath::OddEvenFill); - QCOMPARE(vp->joinStyle(), QQuickVisualPath::BevelJoin); + QCOMPARE(vp->fillRule(), QQuickShapePath::OddEvenFill); + QCOMPARE(vp->joinStyle(), QQuickShapePath::BevelJoin); QCOMPARE(vp->miterLimit(), 2); - QCOMPARE(vp->capStyle(), QQuickVisualPath::SquareCap); - QCOMPARE(vp->strokeStyle(), QQuickVisualPath::SolidLine); + QCOMPARE(vp->capStyle(), QQuickShapePath::SquareCap); + QCOMPARE(vp->strokeStyle(), QQuickShapePath::SolidLine); QCOMPARE(vp->dashOffset(), 0.0f); QCOMPARE(vp->dashPattern(), QVector<qreal>() << 4 << 2); QVERIFY(!vp->fillGradient()); @@ -119,30 +119,30 @@ void tst_QQuickPathItem::vpInitValues() delete obj; } -void tst_QQuickPathItem::basicPathItem() +void tst_QQuickShape::basicShape() { QScopedPointer<QQuickView> window(createView()); window->setSource(testFileUrl("pathitem3.qml")); qApp->processEvents(); - QQuickPathItem *obj = findItem<QQuickPathItem>(window->rootObject(), "pathItem"); + QQuickShape *obj = findItem<QQuickShape>(window->rootObject(), "pathItem"); QVERIFY(obj != nullptr); QQmlListReference list(obj, "elements"); QCOMPARE(list.count(), 1); - QQuickVisualPath *vp = qobject_cast<QQuickVisualPath *>(list.at(0)); + QQuickShapePath *vp = qobject_cast<QQuickShapePath *>(list.at(0)); QVERIFY(vp != nullptr); QCOMPARE(vp->strokeWidth(), 4.0f); QVERIFY(vp->fillGradient() != nullptr); QVERIFY(vp->path() != nullptr); - QCOMPARE(vp->strokeStyle(), QQuickVisualPath::DashLine); + QCOMPARE(vp->strokeStyle(), QQuickShapePath::DashLine); vp->setStrokeWidth(5.0f); QCOMPARE(vp->strokeWidth(), 5.0f); - QQuickPathLinearGradient *lgrad = qobject_cast<QQuickPathLinearGradient *>(vp->fillGradient()); + QQuickShapeLinearGradient *lgrad = qobject_cast<QQuickShapeLinearGradient *>(vp->fillGradient()); QVERIFY(lgrad != nullptr); - QCOMPARE(lgrad->spread(), QQuickPathGradient::PadSpread); + QCOMPARE(lgrad->spread(), QQuickShapeGradient::PadSpread); QCOMPARE(lgrad->x1(), 20.0f); QQmlListReference stopList(lgrad, "stops"); QCOMPARE(stopList.count(), 5); @@ -154,14 +154,14 @@ void tst_QQuickPathItem::basicPathItem() QCOMPARE(pathList.count(), 3); } -void tst_QQuickPathItem::changeSignals() +void tst_QQuickShape::changeSignals() { QScopedPointer<QQuickView> window(createView()); window->setSource(testFileUrl("pathitem3.qml")); qApp->processEvents(); - QQuickPathItem *obj = findItem<QQuickPathItem>(window->rootObject(), "pathItem"); + QQuickShape *obj = findItem<QQuickShape>(window->rootObject(), "pathItem"); QVERIFY(obj != nullptr); QSignalSpy asyncPropSpy(obj, SIGNAL(asynchronousChanged())); @@ -170,7 +170,7 @@ void tst_QQuickPathItem::changeSignals() QCOMPARE(asyncPropSpy.count(), 2); QQmlListReference list(obj, "elements"); - QQuickVisualPath *vp = qobject_cast<QQuickVisualPath *>(list.at(0)); + QQuickShapePath *vp = qobject_cast<QQuickShapePath *>(list.at(0)); QVERIFY(vp != nullptr); // Verify that VisualPath property changes emit changed(). @@ -178,13 +178,13 @@ void tst_QQuickPathItem::changeSignals() QSignalSpy strokeColorPropSpy(vp, SIGNAL(strokeColorChanged())); vp->setStrokeColor(Qt::blue); vp->setStrokeWidth(1.0f); - QQuickPathGradient *g = vp->fillGradient(); + QQuickShapeGradient *g = vp->fillGradient(); vp->setFillGradient(nullptr); vp->setFillColor(Qt::yellow); - vp->setFillRule(QQuickVisualPath::WindingFill); - vp->setJoinStyle(QQuickVisualPath::MiterJoin); + vp->setFillRule(QQuickShapePath::WindingFill); + vp->setJoinStyle(QQuickShapePath::MiterJoin); vp->setMiterLimit(5); - vp->setCapStyle(QQuickVisualPath::RoundCap); + vp->setCapStyle(QQuickShapePath::RoundCap); vp->setDashOffset(10); vp->setDashPattern(QVector<qreal>() << 1 << 2 << 3 << 4); QCOMPARE(strokeColorPropSpy.count(), 1); @@ -201,18 +201,18 @@ void tst_QQuickPathItem::changeSignals() // Verify that property changes from the gradient bubble up and result in changed(). vp->setFillGradient(g); QCOMPARE(vpChangeSpy.count(), 13); - QQuickPathLinearGradient *lgrad = qobject_cast<QQuickPathLinearGradient *>(g); + QQuickShapeLinearGradient *lgrad = qobject_cast<QQuickShapeLinearGradient *>(g); lgrad->setX2(200); QCOMPARE(vpChangeSpy.count(), 14); QQmlListReference stopList(lgrad, "stops"); QCOMPARE(stopList.count(), 5); - qobject_cast<QQuickPathGradientStop *>(stopList.at(1))->setPosition(0.3); + qobject_cast<QQuickShapeGradientStop *>(stopList.at(1))->setPosition(0.3); QCOMPARE(vpChangeSpy.count(), 15); - qobject_cast<QQuickPathGradientStop *>(stopList.at(1))->setColor(Qt::black); + qobject_cast<QQuickShapeGradientStop *>(stopList.at(1))->setColor(Qt::black); QCOMPARE(vpChangeSpy.count(), 16); } -void tst_QQuickPathItem::render() +void tst_QQuickShape::render() { QScopedPointer<QQuickView> window(createView()); @@ -229,7 +229,7 @@ void tst_QQuickPathItem::render() QVERIFY(QQuickVisualTestUtil::compareImages(img.convertToFormat(refImg.format()), refImg)); } -void tst_QQuickPathItem::renderWithMultipleVp() +void tst_QQuickShape::renderWithMultipleSp() { QScopedPointer<QQuickView> window(createView()); @@ -246,6 +246,6 @@ void tst_QQuickPathItem::renderWithMultipleVp() QVERIFY(QQuickVisualTestUtil::compareImages(img.convertToFormat(refImg.format()), refImg)); } -QTEST_MAIN(tst_QQuickPathItem) +QTEST_MAIN(tst_QQuickShape) -#include "tst_qquickpathitem.moc" +#include "tst_qquickshape.moc" diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro index ebc2e32b79..2ff606488c 100644 --- a/tests/auto/quick/quick.pro +++ b/tests/auto/quick/quick.pro @@ -69,7 +69,7 @@ QUICKTESTS = \ qquickmousearea \ qquickmultipointtoucharea \ qquickpainteditem \ - qquickpathitem \ + qquickshape \ qquickpathview \ qquickpincharea \ qquickpositioners \ diff --git a/tests/manual/pathitem/pathitem.pro b/tests/manual/pathitem/pathitem.pro deleted file mode 100644 index 291b0e3ab9..0000000000 --- a/tests/manual/pathitem/pathitem.pro +++ /dev/null @@ -1,6 +0,0 @@ -TEMPLATE = app - -QT += quick qml -SOURCES += main.cpp -RESOURCES += pathitem.qrc -OTHER_FILES += pathitemtest.qml diff --git a/tests/manual/pathitem/pathitem.qrc b/tests/manual/pathitem/pathitem.qrc deleted file mode 100644 index d128548ccf..0000000000 --- a/tests/manual/pathitem/pathitem.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/pathitemtest"> - <file>pathitemtest.qml</file> - </qresource> -</RCC> diff --git a/tests/manual/pathitem/pathitemtest.qml b/tests/manual/pathitem/pathitemtest.qml deleted file mode 100644 index 2327464614..0000000000 --- a/tests/manual/pathitem/pathitemtest.qml +++ /dev/null @@ -1,4045 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtQuick module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.9 -import Qt.labs.pathitem 1.0 - -Rectangle { - id: root - width: 1024 - height: 768 - - property color col: "lightsteelblue" - gradient: Gradient { - GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") } - GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") } - GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") } - GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") } - } - - Row { - anchors.top: parent.top - anchors.centerIn: parent - spacing: 20 - - Column { - spacing: 20 - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 100 - PathItem { - id: triangle - anchors.fill: parent - VisualPath { - strokeWidth: 4 - strokeColor: "red" - fillGradient: PathLinearGradient { - x1: 0; y1: 0 - x2: 200; y2: 100 - PathGradientStop { position: 0; color: "blue" } - PathGradientStop { position: 0.2; color: "green" } - PathGradientStop { position: 0.4; color: "red" } - PathGradientStop { position: 0.6; color: "yellow" } - PathGradientStop { position: 1; color: "cyan" } - } - fillColor: "blue" // ignored with the gradient set - strokeStyle: VisualPath.DashLine - dashPattern: [ 1, 4 ] - Path { - PathLine { x: 200; y: 100 } - PathLine { x: 0; y: 100 } - PathLine { x: 0; y: 0 } - } - } - transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 } - SequentialAnimation on angle { - NumberAnimation { from: 0; to: 75; duration: 2000 } - NumberAnimation { from: 75; to: -75; duration: 4000 } - NumberAnimation { from: -75; to: 0; duration: 2000 } - loops: Animation.Infinite - } - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 100 - PathItem { - anchors.fill: parent - VisualPath { - id: someCurve - property color sc: "gray" - strokeColor: sc - property color fc: "yellow" - fillColor: fc - Path { - startX: 20; startY: 10 - PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } - PathLine { x: 150; y: 80 } - PathQuad { x: 180; y: 10; controlX: 200; controlY: 80 } - PathLine { x: 20; y: 10 } - } - // Dynamic changes via property bindings etc. all work but can - // be computationally expense with the generic backend for properties - // that need retriangulating on every change. Should be cheap with NVPR. - NumberAnimation on strokeWidth { - from: 1; to: 20; duration: 10000 - } - } - } - // Changing colors for a solid stroke or fill is simple and - // (relatively) cheap. However, changing to/from transparent - // stroke/fill color and stroke width 0 are special as these - // change the scenegraph node tree (with the generic backend). - Timer { - interval: 2000 - running: true - repeat: true - onTriggered: someCurve.fillColor = (someCurve.fillColor === someCurve.fc ? "transparent" : someCurve.fc) - } - Timer { - interval: 1000 - running: true - repeat: true - onTriggered: someCurve.strokeColor = (someCurve.strokeColor === someCurve.sc ? "transparent" : someCurve.sc) - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 300 - height: 100 - PathItem { - id: linesAndMoves - anchors.fill: parent - VisualPath { - strokeColor: "black" - Path { - startX: 0; startY: 50 - PathLine { relativeX: 100; y: 50 } - PathMove { relativeX: 100; y: 50 } - PathLine { relativeX: 100; y: 50 } - } - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 120 - PathItem { - anchors.fill: parent - VisualPath { - id: joinTest - strokeColor: "black" - strokeWidth: 16 - fillColor: "transparent" - capStyle: VisualPath.RoundCap - Path { - startX: 30 - startY: 30 - PathLine { x: 100; y: 100 } - PathLine { x: 30; y: 100 } - } - } - } - Timer { - interval: 1000 - repeat: true - running: true - property variant styles: [ VisualPath.BevelJoin, VisualPath.MiterJoin, VisualPath.RoundJoin ] - onTriggered: { - for (var i = 0; i < styles.length; ++i) - if (styles[i] === joinTest.joinStyle) { - joinTest.joinStyle = styles[(i + 1) % styles.length]; - break; - } - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 100 - PathItem { - anchors.fill: parent - VisualPath { - id: star - strokeColor: "blue" - fillColor: "lightGray" - strokeWidth: 2 - Path { - PathMove { x: 90; y: 50 } - PathLine { x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI) } - PathLine { x: 90; y: 50 } - } - } - } - Timer { - interval: 1000 - onTriggered: star.fillRule = (star.fillRule === VisualPath.OddEvenFill ? VisualPath.WindingFill : VisualPath.OddEvenFill) - repeat: true - running: true - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 100 - PathItem { - anchors.fill: parent - VisualPath { - strokeWidth: 4 - strokeColor: "black" - fillColor: "transparent" - Path { - startX: 20; startY: 10 - PathCubic { - id: cb - x: 180; y: 10 - control1X: -10; control1Y: 90; control2Y: 90 - NumberAnimation on control2X { from: 400; to: 0; duration: 5000; loops: Animation.Infinite } - } - } - } - } - } - } - - Column { - spacing: 20 - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 100 - PathItem { - anchors.fill: parent - VisualPath { - fillColor: "transparent" - strokeColor: "red" - strokeWidth: 4 - Path { - startX: 10; startY: 40 - PathArc { - x: 10; y: 60 - radiusX: 40; radiusY: 40 - useLargeArc: true - } - } - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 200 - height: 200 - Rectangle { - anchors.centerIn: parent - // have a size smaller than 150x150 - width: 100 - height: 100 - // and enable clipping. Normally this goes via scissoring, unless - // some transform triggers the stencil-based path. Ensure this via rotation. - clip: true - NumberAnimation on rotation { - from: 0; to: 360; duration: 5000; loops: Animation.Infinite - } - - PathItem { - width: 150 - height: 150 - - VisualPath { - fillColor: "blue" - strokeColor: "red" - strokeWidth: 4 - Path { - startX: 10; startY: 10 - PathLine { x: 140; y: 140 } - PathLine { x: 10; y: 140 } - PathLine { x: 10; y: 10 } - } - } - } - } - } - - // stencil clip test #2, something more complicated: - Rectangle { - border.color: "purple" - color: "transparent" - width: 150 - height: 150 - Rectangle { - anchors.centerIn: parent - width: 60 - height: 60 - clip: true - NumberAnimation on rotation { - from: 0; to: 360; duration: 5000; loops: Animation.Infinite - } - PathItem { - width: 100 - height: 100 - VisualPath { - id: clippedStar - strokeColor: "blue" - fillColor: "lightGray" - strokeWidth: 2 - Path { - PathMove { x: 90; y: 50 } - PathLine { x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI) } - PathLine { x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI) } - PathLine { x: 90; y: 50 } - } - } - } - Timer { - interval: 1000 - onTriggered: clippedStar.fillRule = (clippedStar.fillRule === VisualPath.OddEvenFill ? VisualPath.WindingFill : VisualPath.OddEvenFill) - repeat: true - running: true - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 100 - height: 100 - PathItem { - anchors.fill: parent - VisualPath { - strokeColor: "red" - Path { - PathLine { x: 100; y: 100 } - } - } - VisualPath { - strokeColor: "blue" - Path { - startX: 100; startY: 0 - PathLine { x: 0; y: 100 } - } - } - } - } - - Rectangle { - border.color: "purple" - color: "transparent" - width: 100 - height: 100 - - PathLinearGradient { - id: refGrad - x1: 0; y1: 0 - x2: 200; y2: 100 - PathGradientStop { position: 0; color: "blue" } - PathGradientStop { position: 0.2; color: "green" } - PathGradientStop { position: 0.4; color: "red" } - PathGradientStop { position: 0.6; color: "yellow" } - PathGradientStop { position: 1; color: "cyan" } - } - - PathItem { - id: jsApiItem - anchors.fill: parent - asynchronous: true - - Component.onCompleted: { - clearVisualPaths(); - - var path = newPath(); - var sfp = newStrokeFillParams(); - sfp.strokeColor = "red"; - path.lineTo(100, 100); - appendVisualPath(path, sfp) - - path.clear(); - sfp.clear(); - sfp.strokeColor = "blue"; - path.moveTo(100, 0); - path.lineTo(0, 100); - appendVisualPath(path, sfp) - - path.clear(); - sfp.clear(); - sfp.strokeColor = "red" - sfp.strokeWidth = 4; - sfp.fillGradient = refGrad; - path.moveTo(10, 40); - path.arcTo(40, 40, 0, 10, 60, true, true); - appendVisualPath(path, sfp); - - commitVisualPaths(); - } - } - } - } - } - - Rectangle { - id: stackTestRect - SequentialAnimation on opacity { - NumberAnimation { from: 0; to: 1; duration: 5000 } - PauseAnimation { duration: 2000 } - NumberAnimation { from: 1; to: 0; duration: 5000 } - PauseAnimation { duration: 2000 } - loops: Animation.Infinite - id: opAnim - } - color: "blue" - anchors.margins: 10 - anchors.fill: parent - } - MouseArea { - anchors.fill: parent - onClicked: stackTestRect.visible = !stackTestRect.visible - } - - MouseArea { - width: 200 - height: 200 - anchors.right: parent.right - anchors.top: parent.top - onClicked: { - console.log("Roar!"); - - jsApiItem.clearVisualPaths(); - - var p = jsApiItem.newPath(); var sfp = jsApiItem.newStrokeFillParams(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-122.304, 84.285); - p.cubicTo(-122.304, 84.285, -122.203, 86.179, -123.027, 86.16); - p.cubicTo(-123.851, 86.141, -140.305, 38.066, -160.833, 40.309); - p.cubicTo(-160.833, 40.309, -143.05, 32.956, -122.304, 84.285); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-118.774, 81.262); - p.cubicTo(-118.774, 81.262, -119.323, 83.078, -120.092, 82.779); - p.cubicTo(-120.86, 82.481, -119.977, 31.675, -140.043, 26.801); - p.cubicTo(-140.043, 26.801, -120.82, 25.937, -118.774, 81.262); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-91.284, 123.59); - p.cubicTo(-91.284, 123.59, -89.648, 124.55, -90.118, 125.227); - p.cubicTo(-90.589, 125.904, -139.763, 113.102, -149.218, 131.459); - p.cubicTo(-149.218, 131.459, -145.539, 112.572, -91.284, 123.59); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-94.093, 133.801); - p.cubicTo(-94.093, 133.801, -92.237, 134.197, -92.471, 134.988); - p.cubicTo(-92.704, 135.779, -143.407, 139.121, -146.597, 159.522); - p.cubicTo(-146.597, 159.522, -149.055, 140.437, -94.093, 133.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-98.304, 128.276); - p.cubicTo(-98.304, 128.276, -96.526, 128.939, -96.872, 129.687); - p.cubicTo(-97.218, 130.435, -147.866, 126.346, -153.998, 146.064); - p.cubicTo(-153.998, 146.064, -153.646, 126.825, -98.304, 128.276); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-109.009, 110.072); - p.cubicTo(-109.009, 110.072, -107.701, 111.446, -108.34, 111.967); - p.cubicTo(-108.979, 112.488, -152.722, 86.634, -166.869, 101.676); - p.cubicTo(-166.869, 101.676, -158.128, 84.533, -109.009, 110.072); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-116.554, 114.263); - p.cubicTo(-116.554, 114.263, -115.098, 115.48, -115.674, 116.071); - p.cubicTo(-116.25, 116.661, -162.638, 95.922, -174.992, 112.469); - p.cubicTo(-174.992, 112.469, -168.247, 94.447, -116.554, 114.263); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-119.154, 118.335); - p.cubicTo(-119.154, 118.335, -117.546, 119.343, -118.036, 120.006); - p.cubicTo(-118.526, 120.669, -167.308, 106.446, -177.291, 124.522); - p.cubicTo(-177.291, 124.522, -173.066, 105.749, -119.154, 118.335); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-108.42, 118.949); - p.cubicTo(-108.42, 118.949, -107.298, 120.48, -107.999, 120.915); - p.cubicTo(-108.7, 121.35, -148.769, 90.102, -164.727, 103.207); - p.cubicTo(-164.727, 103.207, -153.862, 87.326, -108.42, 118.949); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-128.2, 90); - p.cubicTo(-128.2, 90, -127.6, 91.8, -128.4, 92); - p.cubicTo(-129.2, 92.2, -157.8, 50.2, -177.001, 57.8); - p.cubicTo(-177.001, 57.8, -161.8, 46, -128.2, 90); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-127.505, 96.979); - p.cubicTo(-127.505, 96.979, -126.53, 98.608, -127.269, 98.975); - p.cubicTo(-128.007, 99.343, -164.992, 64.499, -182.101, 76.061); - p.cubicTo(-182.101, 76.061, -169.804, 61.261, -127.505, 96.979); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.172; - p.moveTo(-127.62, 101.349); - p.cubicTo(-127.62, 101.349, -126.498, 102.88, -127.199, 103.315); - p.cubicTo(-127.9, 103.749, -167.969, 72.502, -183.927, 85.607); - p.cubicTo(-183.927, 85.607, -173.062, 69.726, -127.62, 101.349); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(-129.83, 103.065); - p.cubicTo(-129.327, 109.113, -128.339, 115.682, -126.6, 118.801); - p.cubicTo(-126.6, 118.801, -130.2, 131.201, -121.4, 144.401); - p.cubicTo(-121.4, 144.401, -121.8, 151.601, -120.2, 154.801); - p.cubicTo(-120.2, 154.801, -116.2, 163.201, -111.4, 164.001); - p.cubicTo(-107.516, 164.648, -98.793, 167.717, -88.932, 169.121); - p.cubicTo(-88.932, 169.121, -71.8, 183.201, -75, 196.001); - p.cubicTo(-75, 196.001, -75.4, 212.401, -79, 214.001); - p.cubicTo(-79, 214.001, -67.4, 202.801, -77, 219.601); - p.lineTo(-81.4, 238.401); - p.cubicTo(-81.4, 238.401, -55.8, 216.801, -71.4, 235.201); - p.lineTo(-81.4, 261.201); - p.cubicTo(-81.4, 261.201, -61.8, 242.801, -69, 251.201); - p.lineTo(-72.2, 260.001); - p.cubicTo(-72.2, 260.001, -29, 232.801, -59.8, 262.401); - p.cubicTo(-59.8, 262.401, -51.8, 258.801, -47.4, 261.601); - p.cubicTo(-47.4, 261.601, -40.6, 260.401, -41.4, 262.001); - p.cubicTo(-41.4, 262.001, -62.2, 272.401, -65.8, 290.801); - p.cubicTo(-65.8, 290.801, -57.4, 280.801, -60.6, 291.601); - p.lineTo(-60.2, 303.201); - p.cubicTo(-60.2, 303.201, -56.2, 281.601, -56.6, 319.201); - p.cubicTo(-56.6, 319.201, -37.4, 301.201, -49, 322.001); - p.lineTo(-49, 338.801); - p.cubicTo(-49, 338.801, -33.8, 322.401, -40.2, 335.201); - p.cubicTo(-40.2, 335.201, -30.2, 326.401, -34.2, 341.601); - p.cubicTo(-34.2, 341.601, -35, 352.001, -30.6, 340.801); - p.cubicTo(-30.6, 340.801, -14.6, 310.201, -20.6, 336.401); - p.cubicTo(-20.6, 336.401, -21.4, 355.601, -16.6, 340.801); - p.cubicTo(-16.6, 340.801, -16.2, 351.201, -7, 358.401); - p.cubicTo(-7, 358.401, -8.2, 307.601, 4.6, 343.601); - p.lineTo(8.6, 360.001); - p.cubicTo(8.6, 360.001, 11.4, 350.801, 11, 345.601); - p.cubicTo(11, 345.601, 25.8, 329.201, 19, 353.601); - p.cubicTo(19, 353.601, 34.2, 330.801, 31, 344.001); - p.cubicTo(31, 344.001, 23.4, 360.001, 25, 364.801); - p.cubicTo(25, 364.801, 41.8, 330.001, 43, 328.401); - p.cubicTo(43, 328.401, 41, 370.802, 51.8, 334.801); - p.cubicTo(51.8, 334.801, 57.4, 346.801, 54.6, 351.201); - p.cubicTo(54.6, 351.201, 62.6, 343.201, 61.8, 340.001); - p.cubicTo(61.8, 340.001, 66.4, 331.801, 69.2, 345.401); - p.cubicTo(69.2, 345.401, 71, 354.801, 72.6, 351.601); - p.cubicTo(72.6, 351.601, 76.6, 375.602, 77.8, 352.801); - p.cubicTo(77.8, 352.801, 79.4, 339.201, 72.2, 327.601); - p.cubicTo(72.2, 327.601, 73, 324.401, 70.2, 320.401); - p.cubicTo(70.2, 320.401, 83.8, 342.001, 76.6, 313.201); - p.cubicTo(76.6, 313.201, 87.801, 321.201, 89.001, 321.201); - p.cubicTo(89.001, 321.201, 75.4, 298.001, 84.2, 302.801); - p.cubicTo(84.2, 302.801, 79, 292.401, 97.001, 304.401); - p.cubicTo(97.001, 304.401, 81, 288.401, 98.601, 298.001); - p.cubicTo(98.601, 298.001, 106.601, 304.401, 99.001, 294.401); - p.cubicTo(99.001, 294.401, 84.6, 278.401, 106.601, 296.401); - p.cubicTo(106.601, 296.401, 118.201, 312.801, 119.001, 315.601); - p.cubicTo(119.001, 315.601, 109.001, 286.401, 104.601, 283.601); - p.cubicTo(104.601, 283.601, 113.001, 247.201, 154.201, 262.801); - p.cubicTo(154.201, 262.801, 161.001, 280.001, 165.401, 261.601); - p.cubicTo(165.401, 261.601, 178.201, 255.201, 189.401, 282.801); - p.cubicTo(189.401, 282.801, 193.401, 269.201, 192.601, 266.401); - p.cubicTo(192.601, 266.401, 199.401, 267.601, 198.601, 266.401); - p.cubicTo(198.601, 266.401, 211.801, 270.801, 213.001, 270.001); - p.cubicTo(213.001, 270.001, 219.801, 276.801, 220.201, 273.201); - p.cubicTo(220.201, 273.201, 229.401, 276.001, 227.401, 272.401); - p.cubicTo(227.401, 272.401, 236.201, 288.001, 236.601, 291.601); - p.lineTo(239.001, 277.601); - p.lineTo(241.001, 280.401); - p.cubicTo(241.001, 280.401, 242.601, 272.801, 241.801, 271.601); - p.cubicTo(241.001, 270.401, 261.801, 278.401, 266.601, 299.201); - p.lineTo(268.601, 307.601); - p.cubicTo(268.601, 307.601, 274.601, 292.801, 273.001, 288.801); - p.cubicTo(273.001, 288.801, 278.201, 289.601, 278.601, 294.001); - p.cubicTo(278.601, 294.001, 282.601, 270.801, 277.801, 264.801); - p.cubicTo(277.801, 264.801, 282.201, 264.001, 283.401, 267.601); - p.lineTo(283.401, 260.401); - p.cubicTo(283.401, 260.401, 290.601, 261.201, 290.601, 258.801); - p.cubicTo(290.601, 258.801, 295.001, 254.801, 297.001, 259.601); - p.cubicTo(297.001, 259.601, 284.601, 224.401, 303.001, 243.601); - p.cubicTo(303.001, 243.601, 310.201, 254.401, 306.601, 235.601); - p.cubicTo(303.001, 216.801, 299.001, 215.201, 303.801, 214.801); - p.cubicTo(303.801, 214.801, 304.601, 211.201, 302.601, 209.601); - p.cubicTo(300.601, 208.001, 303.801, 209.601, 303.801, 209.601); - p.cubicTo(303.801, 209.601, 308.601, 213.601, 303.401, 191.601); - p.cubicTo(303.401, 191.601, 309.801, 193.201, 297.801, 164.001); - p.cubicTo(297.801, 164.001, 300.601, 161.601, 296.601, 153.201); - p.cubicTo(296.601, 153.201, 304.601, 157.601, 307.401, 156.001); - p.cubicTo(307.401, 156.001, 307.001, 154.401, 303.801, 150.401); - p.cubicTo(303.801, 150.401, 282.201, 95.6, 302.601, 117.601); - p.cubicTo(302.601, 117.601, 314.451, 131.151, 308.051, 108.351); - p.cubicTo(308.051, 108.351, 298.94, 84.341, 299.717, 80.045); - p.lineTo(-129.83, 103.065); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(299.717, 80.245); - p.cubicTo(300.345, 80.426, 302.551, 81.55, 303.801, 83.2); - p.cubicTo(303.801, 83.2, 310.601, 94, 305.401, 75.6); - p.cubicTo(305.401, 75.6, 296.201, 46.8, 305.001, 58); - p.cubicTo(305.001, 58, 311.001, 65.2, 307.801, 51.6); - p.cubicTo(303.936, 35.173, 301.401, 28.8, 301.401, 28.8); - p.cubicTo(301.401, 28.8, 313.001, 33.6, 286.201, -6); - p.lineTo(295.001, -2.4); - p.cubicTo(295.001, -2.4, 275.401, -42, 253.801, -47.2); - p.lineTo(245.801, -53.2); - p.cubicTo(245.801, -53.2, 284.201, -91.2, 271.401, -128); - p.cubicTo(271.401, -128, 264.601, -133.2, 255.001, -124); - p.cubicTo(255.001, -124, 248.601, -119.2, 242.601, -120.8); - p.cubicTo(242.601, -120.8, 211.801, -119.6, 209.801, -119.6); - p.cubicTo(207.801, -119.6, 173.001, -156.8, 107.401, -139.2); - p.cubicTo(107.401, -139.2, 102.201, -137.2, 97.801, -138.4); - p.cubicTo(97.801, -138.4, 79.4, -154.4, 30.6, -131.6); - p.cubicTo(30.6, -131.6, 20.6, -129.6, 19, -129.6); - p.cubicTo(17.4, -129.6, 14.6, -129.6, 6.6, -123.2); - p.cubicTo(-1.4, -116.8, -1.8, -116, -3.8, -114.4); - p.cubicTo(-3.8, -114.4, -20.2, -103.2, -25, -102.4); - p.cubicTo(-25, -102.4, -36.6, -96, -41, -86); - p.lineTo(-44.6, -84.8); - p.cubicTo(-44.6, -84.8, -46.2, -77.6, -46.6, -76.4); - p.cubicTo(-46.6, -76.4, -51.4, -72.8, -52.2, -67.2); - p.cubicTo(-52.2, -67.2, -61, -61.2, -60.6, -56.8); - p.cubicTo(-60.6, -56.8, -62.2, -51.6, -63, -46.8); - p.cubicTo(-63, -46.8, -70.2, -42, -69.4, -39.2); - p.cubicTo(-69.4, -39.2, -77, -25.2, -75.8, -18.4); - p.cubicTo(-75.8, -18.4, -82.2, -18.8, -85, -16.4); - p.cubicTo(-85, -16.4, -85.8, -11.6, -87.4, -11.2); - p.cubicTo(-87.4, -11.2, -90.2, -10, -87.8, -6); - p.cubicTo(-87.8, -6, -89.4, -3.2, -89.8, -1.6); - p.cubicTo(-89.8, -1.6, -89, 1.2, -93.4, 6.8); - p.cubicTo(-93.4, 6.8, -99.8, 25.6, -97.8, 30.8); - p.cubicTo(-97.8, 30.8, -97.4, 35.6, -100.2, 37.2); - p.cubicTo(-100.2, 37.2, -103.8, 36.8, -95.4, 48.8); - p.cubicTo(-95.4, 48.8, -94.6, 50, -97.8, 52.4); - p.cubicTo(-97.8, 52.4, -115, 56, -117.4, 72.4); - p.cubicTo(-117.4, 72.4, -131, 87.2, -131, 92.4); - p.cubicTo(-131, 94.705, -130.729, 97.852, -130.03, 102.465); - p.cubicTo(-130.03, 102.465, -130.6, 110.801, -103, 111.601); - p.cubicTo(-75.4, 112.401, 299.717, 80.245, 299.717, 80.245); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(-115.6, 102.6); - p.cubicTo(-140.6, 63.2, -126.2, 119.601, -126.2, 119.601); - p.cubicTo(-117.4, 154.001, 12.2, 116.401, 12.2, 116.401); - p.cubicTo(12.2, 116.401, 181.001, 86, 192.201, 82); - p.cubicTo(203.401, 78, 298.601, 84.4, 298.601, 84.4); - p.lineTo(293.001, 67.6); - p.cubicTo(228.201, 21.2, 209.001, 44.4, 195.401, 40.4); - p.cubicTo(181.801, 36.4, 184.201, 46, 181.001, 46.8); - p.cubicTo(177.801, 47.6, 138.601, 22.8, 132.201, 23.6); - p.cubicTo(125.801, 24.4, 100.459, 0.649, 115.401, 32.4); - p.cubicTo(131.401, 66.4, 57, 71.6, 40.2, 60.4); - p.cubicTo(23.4, 49.2, 47.4, 78.8, 47.4, 78.8); - p.cubicTo(65.8, 98.8, 31.4, 82, 31.4, 82); - p.cubicTo(-3, 69.2, -27, 94.8, -30.2, 95.6); - p.cubicTo(-33.4, 96.4, -38.2, 99.6, -39, 93.2); - p.cubicTo(-39.8, 86.8, -47.31, 70.099, -79, 96.4); - p.cubicTo(-99, 113.001, -112.8, 91, -112.8, 91); - p.lineTo(-115.6, 102.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#e87f3a"; - sfp.strokeWidth = -1; - p.moveTo(133.51, 25.346); - p.cubicTo(127.11, 26.146, 101.743, 2.407, 116.71, 34.146); - p.cubicTo(133.31, 69.346, 58.31, 73.346, 41.51, 62.146); - p.cubicTo(24.709, 50.946, 48.71, 80.546, 48.71, 80.546); - p.cubicTo(67.11, 100.546, 32.709, 83.746, 32.709, 83.746); - p.cubicTo(-1.691, 70.946, -25.691, 96.546, -28.891, 97.346); - p.cubicTo(-32.091, 98.146, -36.891, 101.346, -37.691, 94.946); - p.cubicTo(-38.491, 88.546, -45.87, 72.012, -77.691, 98.146); - p.cubicTo(-98.927, 115.492, -112.418, 94.037, -112.418, 94.037); - p.lineTo(-115.618, 104.146); - p.cubicTo(-140.618, 64.346, -125.546, 122.655, -125.546, 122.655); - p.cubicTo(-116.745, 157.056, 13.509, 118.146, 13.509, 118.146); - p.cubicTo(13.509, 118.146, 182.31, 87.746, 193.51, 83.746); - p.cubicTo(204.71, 79.746, 299.038, 86.073, 299.038, 86.073); - p.lineTo(293.51, 68.764); - p.cubicTo(228.71, 22.364, 210.31, 46.146, 196.71, 42.146); - p.cubicTo(183.11, 38.146, 185.51, 47.746, 182.31, 48.546); - p.cubicTo(179.11, 49.346, 139.91, 24.546, 133.51, 25.346); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ea8c4d"; - sfp.strokeWidth = -1; - p.moveTo(134.819, 27.091); - p.cubicTo(128.419, 27.891, 103.685, 3.862, 118.019, 35.891); - p.cubicTo(134.219, 72.092, 59.619, 75.092, 42.819, 63.892); - p.cubicTo(26.019, 52.692, 50.019, 82.292, 50.019, 82.292); - p.cubicTo(68.419, 102.292, 34.019, 85.492, 34.019, 85.492); - p.cubicTo(-0.381, 72.692, -24.382, 98.292, -27.582, 99.092); - p.cubicTo(-30.782, 99.892, -35.582, 103.092, -36.382, 96.692); - p.cubicTo(-37.182, 90.292, -44.43, 73.925, -76.382, 99.892); - p.cubicTo(-98.855, 117.983, -112.036, 97.074, -112.036, 97.074); - p.lineTo(-115.636, 105.692); - p.cubicTo(-139.436, 66.692, -124.891, 125.71, -124.891, 125.71); - p.cubicTo(-116.091, 160.11, 14.819, 119.892, 14.819, 119.892); - p.cubicTo(14.819, 119.892, 183.619, 89.492, 194.819, 85.492); - p.cubicTo(206.019, 81.492, 299.474, 87.746, 299.474, 87.746); - p.lineTo(294.02, 69.928); - p.cubicTo(229.219, 23.528, 211.619, 47.891, 198.019, 43.891); - p.cubicTo(184.419, 39.891, 186.819, 49.491, 183.619, 50.292); - p.cubicTo(180.419, 51.092, 141.219, 26.291, 134.819, 27.091); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ec9961"; - sfp.strokeWidth = -1; - p.moveTo(136.128, 28.837); - p.cubicTo(129.728, 29.637, 104.999, 5.605, 119.328, 37.637); - p.cubicTo(136.128, 75.193, 60.394, 76.482, 44.128, 65.637); - p.cubicTo(27.328, 54.437, 51.328, 84.037, 51.328, 84.037); - p.cubicTo(69.728, 104.037, 35.328, 87.237, 35.328, 87.237); - p.cubicTo(0.928, 74.437, -23.072, 100.037, -26.272, 100.837); - p.cubicTo(-29.472, 101.637, -34.272, 104.837, -35.072, 98.437); - p.cubicTo(-35.872, 92.037, -42.989, 75.839, -75.073, 101.637); - p.cubicTo(-98.782, 120.474, -111.655, 100.11, -111.655, 100.11); - p.lineTo(-115.655, 107.237); - p.cubicTo(-137.455, 70.437, -124.236, 128.765, -124.236, 128.765); - p.cubicTo(-115.436, 163.165, 16.128, 121.637, 16.128, 121.637); - p.cubicTo(16.128, 121.637, 184.928, 91.237, 196.129, 87.237); - p.cubicTo(207.329, 83.237, 299.911, 89.419, 299.911, 89.419); - p.lineTo(294.529, 71.092); - p.cubicTo(229.729, 24.691, 212.929, 49.637, 199.329, 45.637); - p.cubicTo(185.728, 41.637, 188.128, 51.237, 184.928, 52.037); - p.cubicTo(181.728, 52.837, 142.528, 28.037, 136.128, 28.837); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#eea575"; - sfp.strokeWidth = -1; - p.moveTo(137.438, 30.583); - p.cubicTo(131.037, 31.383, 106.814, 7.129, 120.637, 39.383); - p.cubicTo(137.438, 78.583, 62.237, 78.583, 45.437, 67.383); - p.cubicTo(28.637, 56.183, 52.637, 85.783, 52.637, 85.783); - p.cubicTo(71.037, 105.783, 36.637, 88.983, 36.637, 88.983); - p.cubicTo(2.237, 76.183, -21.763, 101.783, -24.963, 102.583); - p.cubicTo(-28.163, 103.383, -32.963, 106.583, -33.763, 100.183); - p.cubicTo(-34.563, 93.783, -41.548, 77.752, -73.763, 103.383); - p.cubicTo(-98.709, 122.965, -111.273, 103.146, -111.273, 103.146); - p.lineTo(-115.673, 108.783); - p.cubicTo(-135.473, 73.982, -123.582, 131.819, -123.582, 131.819); - p.cubicTo(-114.782, 166.22, 17.437, 123.383, 17.437, 123.383); - p.cubicTo(17.437, 123.383, 186.238, 92.983, 197.438, 88.983); - p.cubicTo(208.638, 84.983, 300.347, 91.092, 300.347, 91.092); - p.lineTo(295.038, 72.255); - p.cubicTo(230.238, 25.855, 214.238, 51.383, 200.638, 47.383); - p.cubicTo(187.038, 43.383, 189.438, 52.983, 186.238, 53.783); - p.cubicTo(183.038, 54.583, 143.838, 29.783, 137.438, 30.583); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f1b288"; - sfp.strokeWidth = -1; - p.moveTo(138.747, 32.328); - p.cubicTo(132.347, 33.128, 106.383, 9.677, 121.947, 41.128); - p.cubicTo(141.147, 79.928, 63.546, 80.328, 46.746, 69.128); - p.cubicTo(29.946, 57.928, 53.946, 87.528, 53.946, 87.528); - p.cubicTo(72.346, 107.528, 37.946, 90.728, 37.946, 90.728); - p.cubicTo(3.546, 77.928, -20.454, 103.528, -23.654, 104.328); - p.cubicTo(-26.854, 105.128, -31.654, 108.328, -32.454, 101.928); - p.cubicTo(-33.254, 95.528, -40.108, 79.665, -72.454, 105.128); - p.cubicTo(-98.636, 125.456, -110.891, 106.183, -110.891, 106.183); - p.lineTo(-115.691, 110.328); - p.cubicTo(-133.691, 77.128, -122.927, 134.874, -122.927, 134.874); - p.cubicTo(-114.127, 169.274, 18.746, 125.128, 18.746, 125.128); - p.cubicTo(18.746, 125.128, 187.547, 94.728, 198.747, 90.728); - p.cubicTo(209.947, 86.728, 300.783, 92.764, 300.783, 92.764); - p.lineTo(295.547, 73.419); - p.cubicTo(230.747, 27.019, 215.547, 53.128, 201.947, 49.128); - p.cubicTo(188.347, 45.128, 190.747, 54.728, 187.547, 55.528); - p.cubicTo(184.347, 56.328, 145.147, 31.528, 138.747, 32.328); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f3bf9c"; - sfp.strokeWidth = -1; - p.moveTo(140.056, 34.073); - p.cubicTo(133.655, 34.873, 107.313, 11.613, 123.255, 42.873); - p.cubicTo(143.656, 82.874, 64.855, 82.074, 48.055, 70.874); - p.cubicTo(31.255, 59.674, 55.255, 89.274, 55.255, 89.274); - p.cubicTo(73.655, 109.274, 39.255, 92.474, 39.255, 92.474); - p.cubicTo(4.855, 79.674, -19.145, 105.274, -22.345, 106.074); - p.cubicTo(-25.545, 106.874, -30.345, 110.074, -31.145, 103.674); - p.cubicTo(-31.945, 97.274, -38.668, 81.578, -71.145, 106.874); - p.cubicTo(-98.564, 127.947, -110.509, 109.219, -110.509, 109.219); - p.lineTo(-115.709, 111.874); - p.cubicTo(-131.709, 81.674, -122.273, 137.929, -122.273, 137.929); - p.cubicTo(-113.473, 172.329, 20.055, 126.874, 20.055, 126.874); - p.cubicTo(20.055, 126.874, 188.856, 96.474, 200.056, 92.474); - p.cubicTo(211.256, 88.474, 301.22, 94.437, 301.22, 94.437); - p.lineTo(296.056, 74.583); - p.cubicTo(231.256, 28.183, 216.856, 54.874, 203.256, 50.874); - p.cubicTo(189.656, 46.873, 192.056, 56.474, 188.856, 57.274); - p.cubicTo(185.656, 58.074, 146.456, 33.273, 140.056, 34.073); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f5ccb0"; - sfp.strokeWidth = -1; - p.moveTo(141.365, 35.819); - p.cubicTo(134.965, 36.619, 107.523, 13.944, 124.565, 44.619); - p.cubicTo(146.565, 84.219, 66.164, 83.819, 49.364, 72.619); - p.cubicTo(32.564, 61.419, 56.564, 91.019, 56.564, 91.019); - p.cubicTo(74.964, 111.019, 40.564, 94.219, 40.564, 94.219); - p.cubicTo(6.164, 81.419, -17.836, 107.019, -21.036, 107.819); - p.cubicTo(-24.236, 108.619, -29.036, 111.819, -29.836, 105.419); - p.cubicTo(-30.636, 99.019, -37.227, 83.492, -69.836, 108.619); - p.cubicTo(-98.491, 130.438, -110.127, 112.256, -110.127, 112.256); - p.lineTo(-115.727, 113.419); - p.cubicTo(-130.128, 85.019, -121.618, 140.983, -121.618, 140.983); - p.cubicTo(-112.818, 175.384, 21.364, 128.619, 21.364, 128.619); - p.cubicTo(21.364, 128.619, 190.165, 98.219, 201.365, 94.219); - p.cubicTo(212.565, 90.219, 301.656, 96.11, 301.656, 96.11); - p.lineTo(296.565, 75.746); - p.cubicTo(231.765, 29.346, 218.165, 56.619, 204.565, 52.619); - p.cubicTo(190.965, 48.619, 193.365, 58.219, 190.165, 59.019); - p.cubicTo(186.965, 59.819, 147.765, 35.019, 141.365, 35.819); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f8d8c4"; - sfp.strokeWidth = -1; - p.moveTo(142.674, 37.565); - p.cubicTo(136.274, 38.365, 108.832, 15.689, 125.874, 46.365); - p.cubicTo(147.874, 85.965, 67.474, 85.565, 50.674, 74.365); - p.cubicTo(33.874, 63.165, 57.874, 92.765, 57.874, 92.765); - p.cubicTo(76.274, 112.765, 41.874, 95.965, 41.874, 95.965); - p.cubicTo(7.473, 83.165, -16.527, 108.765, -19.727, 109.565); - p.cubicTo(-22.927, 110.365, -27.727, 113.565, -28.527, 107.165); - p.cubicTo(-29.327, 100.765, -35.786, 85.405, -68.527, 110.365); - p.cubicTo(-98.418, 132.929, -109.745, 115.293, -109.745, 115.293); - p.lineTo(-115.745, 114.965); - p.cubicTo(-129.346, 88.564, -120.963, 144.038, -120.963, 144.038); - p.cubicTo(-112.163, 178.438, 22.673, 130.365, 22.673, 130.365); - p.cubicTo(22.673, 130.365, 191.474, 99.965, 202.674, 95.965); - p.cubicTo(213.874, 91.965, 302.093, 97.783, 302.093, 97.783); - p.lineTo(297.075, 76.91); - p.cubicTo(232.274, 30.51, 219.474, 58.365, 205.874, 54.365); - p.cubicTo(192.274, 50.365, 194.674, 59.965, 191.474, 60.765); - p.cubicTo(188.274, 61.565, 149.074, 36.765, 142.674, 37.565); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#fae5d7"; - sfp.strokeWidth = -1; - p.moveTo(143.983, 39.31); - p.cubicTo(137.583, 40.11, 110.529, 17.223, 127.183, 48.11); - p.cubicTo(149.183, 88.91, 68.783, 87.31, 51.983, 76.11); - p.cubicTo(35.183, 64.91, 59.183, 94.51, 59.183, 94.51); - p.cubicTo(77.583, 114.51, 43.183, 97.71, 43.183, 97.71); - p.cubicTo(8.783, 84.91, -15.217, 110.51, -18.417, 111.31); - p.cubicTo(-21.618, 112.11, -26.418, 115.31, -27.218, 108.91); - p.cubicTo(-28.018, 102.51, -34.346, 87.318, -67.218, 112.11); - p.cubicTo(-98.345, 135.42, -109.363, 118.329, -109.363, 118.329); - p.lineTo(-115.764, 116.51); - p.cubicTo(-128.764, 92.51, -120.309, 147.093, -120.309, 147.093); - p.cubicTo(-111.509, 181.493, 23.983, 132.11, 23.983, 132.11); - p.cubicTo(23.983, 132.11, 192.783, 101.71, 203.983, 97.71); - p.cubicTo(215.183, 93.71, 302.529, 99.456, 302.529, 99.456); - p.lineTo(297.583, 78.074); - p.cubicTo(232.783, 31.673, 220.783, 60.11, 207.183, 56.11); - p.cubicTo(193.583, 52.11, 195.983, 61.71, 192.783, 62.51); - p.cubicTo(189.583, 63.31, 150.383, 38.51, 143.983, 39.31); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#fcf2eb"; - sfp.strokeWidth = -1; - p.moveTo(145.292, 41.055); - p.cubicTo(138.892, 41.855, 112.917, 18.411, 128.492, 49.855); - p.cubicTo(149.692, 92.656, 70.092, 89.056, 53.292, 77.856); - p.cubicTo(36.492, 66.656, 60.492, 96.256, 60.492, 96.256); - p.cubicTo(78.892, 116.256, 44.492, 99.456, 44.492, 99.456); - p.cubicTo(10.092, 86.656, -13.908, 112.256, -17.108, 113.056); - p.cubicTo(-20.308, 113.856, -25.108, 117.056, -25.908, 110.656); - p.cubicTo(-26.708, 104.256, -32.905, 89.232, -65.908, 113.856); - p.cubicTo(-98.273, 137.911, -108.982, 121.365, -108.982, 121.365); - p.lineTo(-115.782, 118.056); - p.cubicTo(-128.582, 94.856, -119.654, 150.147, -119.654, 150.147); - p.cubicTo(-110.854, 184.547, 25.292, 133.856, 25.292, 133.856); - p.cubicTo(25.292, 133.856, 194.093, 103.456, 205.293, 99.456); - p.cubicTo(216.493, 95.456, 302.965, 101.128, 302.965, 101.128); - p.lineTo(298.093, 79.237); - p.cubicTo(233.292, 32.837, 222.093, 61.856, 208.493, 57.856); - p.cubicTo(194.893, 53.855, 197.293, 63.456, 194.093, 64.256); - p.cubicTo(190.892, 65.056, 151.692, 40.255, 145.292, 41.055); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(-115.8, 119.601); - p.cubicTo(-128.6, 97.6, -119, 153.201, -119, 153.201); - p.cubicTo(-110.2, 187.601, 26.6, 135.601, 26.6, 135.601); - p.cubicTo(26.6, 135.601, 195.401, 105.2, 206.601, 101.2); - p.cubicTo(217.801, 97.2, 303.401, 102.8, 303.401, 102.8); - p.lineTo(298.601, 80.4); - p.cubicTo(233.801, 34, 223.401, 63.6, 209.801, 59.6); - p.cubicTo(196.201, 55.6, 198.601, 65.2, 195.401, 66); - p.cubicTo(192.201, 66.8, 153.001, 42, 146.601, 42.8); - p.cubicTo(140.201, 43.6, 114.981, 19.793, 129.801, 51.6); - p.cubicTo(152.028, 99.307, 69.041, 89.227, 54.6, 79.6); - p.cubicTo(37.8, 68.4, 61.8, 98, 61.8, 98); - p.cubicTo(80.2, 118.001, 45.8, 101.2, 45.8, 101.2); - p.cubicTo(11.4, 88.4, -12.6, 114.001, -15.8, 114.801); - p.cubicTo(-19, 115.601, -23.8, 118.801, -24.6, 112.401); - p.cubicTo(-25.4, 106, -31.465, 91.144, -64.6, 115.601); - p.cubicTo(-98.2, 140.401, -108.6, 124.401, -108.6, 124.401); - p.lineTo(-115.8, 119.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-74.2, 149.601); - p.cubicTo(-74.2, 149.601, -81.4, 161.201, -60.6, 174.401); - p.cubicTo(-60.6, 174.401, -59.2, 175.801, -77.2, 171.601); - p.cubicTo(-77.2, 171.601, -83.4, 169.601, -85, 159.201); - p.cubicTo(-85, 159.201, -89.8, 154.801, -94.6, 149.201); - p.cubicTo(-99.4, 143.601, -74.2, 149.601, -74.2, 149.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(65.8, 102); - p.cubicTo(65.8, 102, 83.498, 128.821, 82.9, 133.601); - p.cubicTo(81.6, 144.001, 81.4, 153.601, 84.6, 157.601); - p.cubicTo(87.801, 161.601, 96.601, 194.801, 96.601, 194.801); - p.cubicTo(96.601, 194.801, 96.201, 196.001, 108.601, 158.001); - p.cubicTo(108.601, 158.001, 120.201, 142.001, 100.201, 123.601); - p.cubicTo(100.201, 123.601, 65, 94.8, 65.8, 102); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-54.2, 176.401); - p.cubicTo(-54.2, 176.401, -43, 183.601, -57.4, 214.801); - p.lineTo(-51, 212.401); - p.cubicTo(-51, 212.401, -51.8, 223.601, -55, 226.001); - p.lineTo(-47.8, 222.801); - p.cubicTo(-47.8, 222.801, -43, 230.801, -47, 235.601); - p.cubicTo(-47, 235.601, -30.2, 243.601, -31, 250.001); - p.cubicTo(-31, 250.001, -24.6, 242.001, -28.6, 235.601); - p.cubicTo(-32.6, 229.201, -39.8, 233.201, -39, 214.801); - p.lineTo(-47.8, 218.001); - p.cubicTo(-47.8, 218.001, -42.2, 209.201, -42.2, 202.801); - p.lineTo(-50.2, 205.201); - p.cubicTo(-50.2, 205.201, -34.731, 178.623, -45.4, 177.201); - p.cubicTo(-51.4, 176.401, -54.2, 176.401, -54.2, 176.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-21.8, 193.201); - p.cubicTo(-21.8, 193.201, -19, 188.801, -21.8, 189.601); - p.cubicTo(-24.6, 190.401, -55.8, 205.201, -61.8, 214.801); - p.cubicTo(-61.8, 214.801, -27.4, 190.401, -21.8, 193.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-11.4, 201.201); - p.cubicTo(-11.4, 201.201, -8.6, 196.801, -11.4, 197.601); - p.cubicTo(-14.2, 198.401, -45.4, 213.201, -51.4, 222.801); - p.cubicTo(-51.4, 222.801, -17, 198.401, -11.4, 201.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(1.8, 186.001); - p.cubicTo(1.8, 186.001, 4.6, 181.601, 1.8, 182.401); - p.cubicTo(-1, 183.201, -32.2, 198.001, -38.2, 207.601); - p.cubicTo(-38.2, 207.601, -3.8, 183.201, 1.8, 186.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-21.4, 229.601); - p.cubicTo(-21.4, 229.601, -21.4, 223.601, -24.2, 224.401); - p.cubicTo(-27, 225.201, -63, 242.801, -69, 252.401); - p.cubicTo(-69, 252.401, -27, 226.801, -21.4, 229.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-20.2, 218.801); - p.cubicTo(-20.2, 218.801, -19, 214.001, -21.8, 214.801); - p.cubicTo(-23.8, 214.801, -50.2, 226.401, -56.2, 236.001); - p.cubicTo(-56.2, 236.001, -26.6, 214.401, -20.2, 218.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-34.6, 266.401); - p.lineTo(-44.6, 274.001); - p.cubicTo(-44.6, 274.001, -34.2, 266.401, -30.6, 267.601); - p.cubicTo(-30.6, 267.601, -37.4, 278.801, -38.2, 284.001); - p.cubicTo(-38.2, 284.001, -27.8, 271.201, -22.2, 271.601); - p.cubicTo(-22.2, 271.601, -14.6, 272.001, -14.6, 282.801); - p.cubicTo(-14.6, 282.801, -9, 272.401, -5.8, 272.801); - p.cubicTo(-5.8, 272.801, -4.6, 279.201, -5.8, 286.001); - p.cubicTo(-5.8, 286.001, -1.8, 278.401, 2.2, 280.001); - p.cubicTo(2.2, 280.001, 8.6, 278.001, 7.8, 289.601); - p.cubicTo(7.8, 289.601, 7.8, 300.001, 7, 302.801); - p.cubicTo(7, 302.801, 12.6, 276.401, 15, 276.001); - p.cubicTo(15, 276.001, 23, 274.801, 27.8, 283.601); - p.cubicTo(27.8, 283.601, 23.8, 276.001, 28.6, 278.001); - p.cubicTo(28.6, 278.001, 39.4, 279.601, 42.6, 286.401); - p.cubicTo(42.6, 286.401, 35.8, 274.401, 41.4, 277.601); - p.cubicTo(41.4, 277.601, 48.2, 277.601, 49.4, 284.001); - p.cubicTo(49.4, 284.001, 57.8, 305.201, 59.8, 306.801); - p.cubicTo(59.8, 306.801, 52.2, 285.201, 53.8, 285.201); - p.cubicTo(53.8, 285.201, 51.8, 273.201, 57, 288.001); - p.cubicTo(57, 288.001, 53.8, 274.001, 59.4, 274.801); - p.cubicTo(65, 275.601, 69.4, 285.601, 77.8, 283.201); - p.cubicTo(77.8, 283.201, 87.401, 288.801, 89.401, 219.601); - p.lineTo(-34.6, 266.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-29.8, 173.601); - p.cubicTo(-29.8, 173.601, -15, 167.601, 25, 173.601); - p.cubicTo(25, 173.601, 32.2, 174.001, 39, 165.201); - p.cubicTo(45.8, 156.401, 72.6, 149.201, 79, 151.201); - p.lineTo(88.601, 157.601); - p.lineTo(89.401, 158.801); - p.cubicTo(89.401, 158.801, 101.801, 169.201, 102.201, 176.801); - p.cubicTo(102.601, 184.401, 87.801, 232.401, 78.2, 248.401); - p.cubicTo(68.6, 264.401, 59, 276.801, 39.8, 274.401); - p.cubicTo(39.8, 274.401, 19, 270.401, -6.6, 274.401); - p.cubicTo(-6.6, 274.401, -35.8, 272.801, -38.6, 264.801); - p.cubicTo(-41.4, 256.801, -27.4, 241.601, -27.4, 241.601); - p.cubicTo(-27.4, 241.601, -23, 233.201, -24.2, 218.801); - p.cubicTo(-25.4, 204.401, -25, 176.401, -29.8, 173.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#e5668c"; - sfp.strokeWidth = -1; - p.moveTo(-7.8, 175.601); - p.cubicTo(0.6, 194.001, -29, 259.201, -29, 259.201); - p.cubicTo(-31, 260.801, -16.34, 266.846, -6.2, 264.401); - p.cubicTo(4.746, 261.763, 45, 266.001, 45, 266.001); - p.cubicTo(68.6, 250.401, 81.4, 206.001, 81.4, 206.001); - p.cubicTo(81.4, 206.001, 91.801, 182.001, 74.2, 178.801); - p.cubicTo(56.6, 175.601, -7.8, 175.601, -7.8, 175.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#b23259"; - sfp.strokeWidth = -1; - p.moveTo(-9.831, 206.497); - p.cubicTo(-6.505, 193.707, -4.921, 181.906, -7.8, 175.601); - p.cubicTo(-7.8, 175.601, 54.6, 182.001, 65.8, 161.201); - p.cubicTo(70.041, 153.326, 84.801, 184.001, 84.4, 193.601); - p.cubicTo(84.4, 193.601, 21.4, 208.001, 6.6, 196.801); - p.lineTo(-9.831, 206.497); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#a5264c"; - sfp.strokeWidth = -1; - p.moveTo(-5.4, 222.801); - p.cubicTo(-5.4, 222.801, -3.4, 230.001, -5.8, 234.001); - p.cubicTo(-5.8, 234.001, -7.4, 234.801, -8.6, 235.201); - p.cubicTo(-8.6, 235.201, -7.4, 238.801, -1.4, 240.401); - p.cubicTo(-1.4, 240.401, 0.6, 244.801, 3, 245.201); - p.cubicTo(5.4, 245.601, 10.2, 251.201, 14.2, 250.001); - p.cubicTo(18.2, 248.801, 29.4, 244.801, 29.4, 244.801); - p.cubicTo(29.4, 244.801, 35, 241.601, 43.8, 245.201); - p.cubicTo(43.8, 245.201, 46.175, 244.399, 46.6, 240.401); - p.cubicTo(47.1, 235.701, 50.2, 232.001, 52.2, 230.001); - p.cubicTo(54.2, 228.001, 63.8, 215.201, 62.6, 214.801); - p.cubicTo(61.4, 214.401, -5.4, 222.801, -5.4, 222.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ff727f"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(-9.8, 174.401); - p.cubicTo(-9.8, 174.401, -12.6, 196.801, -9.4, 205.201); - p.cubicTo(-6.2, 213.601, -7, 215.601, -7.8, 219.601); - p.cubicTo(-8.6, 223.601, -4.2, 233.601, 1.4, 239.601); - p.lineTo(13.4, 241.201); - p.cubicTo(13.4, 241.201, 28.6, 237.601, 37.8, 240.401); - p.cubicTo(37.8, 240.401, 46.794, 241.744, 50.2, 226.801); - p.cubicTo(50.2, 226.801, 55, 220.401, 62.2, 217.601); - p.cubicTo(69.4, 214.801, 76.6, 173.201, 72.6, 165.201); - p.cubicTo(68.6, 157.201, 54.2, 152.801, 38.2, 168.401); - p.cubicTo(22.2, 184.001, 20.2, 167.201, -9.8, 174.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-8.2, 249.201); - p.cubicTo(-8.2, 249.201, -9, 247.201, -13.4, 246.801); - p.cubicTo(-13.4, 246.801, -35.8, 243.201, -44.2, 230.801); - p.cubicTo(-44.2, 230.801, -51, 225.201, -46.6, 236.801); - p.cubicTo(-46.6, 236.801, -36.2, 257.201, -29.4, 260.001); - p.cubicTo(-29.4, 260.001, -13, 264.001, -8.2, 249.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc3f4c"; - sfp.strokeWidth = -1; - p.moveTo(71.742, 185.229); - p.cubicTo(72.401, 177.323, 74.354, 168.709, 72.6, 165.201); - p.cubicTo(66.154, 152.307, 49.181, 157.695, 38.2, 168.401); - p.cubicTo(22.2, 184.001, 20.2, 167.201, -9.8, 174.401); - p.cubicTo(-9.8, 174.401, -11.545, 188.364, -10.705, 198.376); - p.cubicTo(-10.705, 198.376, 26.6, 186.801, 27.4, 192.401); - p.cubicTo(27.4, 192.401, 29, 189.201, 38.2, 189.201); - p.cubicTo(47.4, 189.201, 70.142, 188.029, 71.742, 185.229); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#a51926"; - sfp.strokeWidth = 2; - p.moveTo(28.6, 175.201); - p.cubicTo(28.6, 175.201, 33.4, 180.001, 29.8, 189.601); - p.cubicTo(29.8, 189.601, 15.4, 205.601, 17.4, 219.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-19.4, 260.001); - p.cubicTo(-19.4, 260.001, -23.8, 247.201, -15, 254.001); - p.cubicTo(-15, 254.001, -10.2, 256.001, -11.4, 257.601); - p.cubicTo(-12.6, 259.201, -18.2, 263.201, -19.4, 260.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-14.36, 261.201); - p.cubicTo(-14.36, 261.201, -17.88, 250.961, -10.84, 256.401); - p.cubicTo(-10.84, 256.401, -6.419, 258.849, -7.96, 259.281); - p.cubicTo(-12.52, 260.561, -7.96, 263.121, -14.36, 261.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-9.56, 261.201); - p.cubicTo(-9.56, 261.201, -13.08, 250.961, -6.04, 256.401); - p.cubicTo(-6.04, 256.401, -1.665, 258.711, -3.16, 259.281); - p.cubicTo(-6.52, 260.561, -3.16, 263.121, -9.56, 261.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-2.96, 261.401); - p.cubicTo(-2.96, 261.401, -6.48, 251.161, 0.56, 256.601); - p.cubicTo(0.56, 256.601, 4.943, 258.933, 3.441, 259.481); - p.cubicTo(0.48, 260.561, 3.441, 263.321, -2.96, 261.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(3.52, 261.321); - p.cubicTo(3.52, 261.321, 0, 251.081, 7.041, 256.521); - p.cubicTo(7.041, 256.521, 10.881, 258.121, 9.921, 259.401); - p.cubicTo(8.961, 260.681, 9.921, 263.241, 3.52, 261.321); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(10.2, 262.001); - p.cubicTo(10.2, 262.001, 5.4, 249.601, 14.6, 256.001); - p.cubicTo(14.6, 256.001, 19.4, 258.001, 18.2, 259.601); - p.cubicTo(17, 261.201, 18.2, 264.401, 10.2, 262.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#a5264c"; - sfp.strokeWidth = 2; - p.moveTo(-18.2, 244.801); - p.cubicTo(-18.2, 244.801, -5, 242.001, 1, 245.201); - p.cubicTo(1, 245.201, 7, 246.401, 8.2, 246.001); - p.cubicTo(9.4, 245.601, 12.6, 245.201, 12.6, 245.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#a5264c"; - sfp.strokeWidth = 2; - p.moveTo(15.8, 253.601); - p.cubicTo(15.8, 253.601, 27.8, 240.001, 39.8, 244.401); - p.cubicTo(46.816, 246.974, 45.8, 243.601, 46.6, 240.801); - p.cubicTo(47.4, 238.001, 47.6, 233.801, 52.6, 230.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(33, 237.601); - p.cubicTo(33, 237.601, 29, 226.801, 26.2, 239.601); - p.cubicTo(23.4, 252.401, 20.2, 256.001, 18.6, 258.801); - p.cubicTo(18.6, 258.801, 18.6, 264.001, 27, 263.601); - p.cubicTo(27, 263.601, 37.8, 263.201, 38.2, 260.401); - p.cubicTo(38.6, 257.601, 37, 246.001, 33, 237.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#a5264c"; - sfp.strokeWidth = 2; - p.moveTo(47, 244.801); - p.cubicTo(47, 244.801, 50.6, 242.401, 53, 243.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#a5264c"; - sfp.strokeWidth = 2; - p.moveTo(53.5, 228.401); - p.cubicTo(53.5, 228.401, 56.4, 223.501, 61.2, 222.701); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#b2b2b2"; - sfp.strokeWidth = -1; - p.moveTo(-25.8, 265.201); - p.cubicTo(-25.8, 265.201, -7.8, 268.401, -3.4, 266.801); - p.cubicTo(-3.4, 266.801, 5.4, 266.801, -3, 268.801); - p.cubicTo(-3, 268.801, -15.8, 268.801, -23.8, 267.601); - p.cubicTo(-23.8, 267.601, -35.4, 262.001, -25.8, 265.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-11.8, 172.001); - p.cubicTo(-11.8, 172.001, 5.8, 172.001, 7.8, 172.801); - p.cubicTo(7.8, 172.801, 15, 203.601, 11.4, 211.201); - p.cubicTo(11.4, 211.201, 10.2, 214.001, 7.4, 208.401); - p.cubicTo(7.4, 208.401, -11, 175.601, -14.2, 173.601); - p.cubicTo(-17.4, 171.601, -13, 172.001, -11.8, 172.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-88.9, 169.301); - p.cubicTo(-88.9, 169.301, -80, 171.001, -67.4, 173.601); - p.cubicTo(-67.4, 173.601, -62.6, 196.001, -59.4, 200.801); - p.cubicTo(-56.2, 205.601, -59.8, 205.601, -63.4, 202.801); - p.cubicTo(-67, 200.001, -81.8, 186.001, -83.8, 181.601); - p.cubicTo(-85.8, 177.201, -88.9, 169.301, -88.9, 169.301); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-67.039, 173.818); - p.cubicTo(-67.039, 173.818, -61.239, 175.366, -60.23, 177.581); - p.cubicTo(-59.222, 179.795, -61.432, 183.092, -61.432, 183.092); - p.cubicTo(-61.432, 183.092, -62.432, 186.397, -63.634, 184.235); - p.cubicTo(-64.836, 182.072, -67.708, 174.412, -67.039, 173.818); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-67, 173.601); - p.cubicTo(-67, 173.601, -63.4, 178.801, -59.8, 178.801); - p.cubicTo(-56.2, 178.801, -55.818, 178.388, -53, 179.001); - p.cubicTo(-48.4, 180.001, -48.8, 178.001, -42.2, 179.201); - p.cubicTo(-39.56, 179.681, -37, 178.801, -34.2, 180.001); - p.cubicTo(-31.4, 181.201, -28.2, 180.401, -27, 178.401); - p.cubicTo(-25.8, 176.401, -21, 172.201, -21, 172.201); - p.cubicTo(-21, 172.201, -33.8, 174.001, -36.6, 174.801); - p.cubicTo(-36.6, 174.801, -59, 176.001, -67, 173.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-22.4, 173.801); - p.cubicTo(-22.4, 173.801, -28.85, 177.301, -29.25, 179.701); - p.cubicTo(-29.65, 182.101, -24, 185.801, -24, 185.801); - p.cubicTo(-24, 185.801, -21.25, 190.401, -20.65, 188.001); - p.cubicTo(-20.05, 185.601, -21.6, 174.201, -22.4, 173.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-59.885, 179.265); - p.cubicTo(-59.885, 179.265, -52.878, 190.453, -52.661, 179.242); - p.cubicTo(-52.661, 179.242, -52.104, 177.984, -53.864, 177.962); - p.cubicTo(-59.939, 177.886, -58.418, 173.784, -59.885, 179.265); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-52.707, 179.514); - p.cubicTo(-52.707, 179.514, -44.786, 190.701, -45.422, 179.421); - p.cubicTo(-45.422, 179.421, -45.415, 179.089, -47.168, 178.936); - p.cubicTo(-51.915, 178.522, -51.57, 174.004, -52.707, 179.514); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-45.494, 179.522); - p.cubicTo(-45.494, 179.522, -37.534, 190.15, -38.203, 180.484); - p.cubicTo(-38.203, 180.484, -38.084, 179.251, -39.738, 178.95); - p.cubicTo(-43.63, 178.244, -43.841, 174.995, -45.494, 179.522); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffcc"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.5; - p.moveTo(-38.618, 179.602); - p.cubicTo(-38.618, 179.602, -30.718, 191.163, -30.37, 181.382); - p.cubicTo(-30.37, 181.382, -28.726, 180.004, -30.472, 179.782); - p.cubicTo(-36.29, 179.042, -35.492, 174.588, -38.618, 179.602); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#e5e5b2"; - sfp.strokeWidth = -1; - p.moveTo(-74.792, 183.132); - p.lineTo(-82.45, 181.601); - p.cubicTo(-85.05, 176.601, -87.15, 170.451, -87.15, 170.451); - p.cubicTo(-87.15, 170.451, -80.8, 171.451, -68.3, 174.251); - p.cubicTo(-68.3, 174.251, -67.424, 177.569, -65.952, 183.364); - p.lineTo(-74.792, 183.132); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#e5e5b2"; - sfp.strokeWidth = -1; - p.moveTo(-9.724, 178.47); - p.cubicTo(-11.39, 175.964, -12.707, 174.206, -13.357, 173.8); - p.cubicTo(-16.37, 171.917, -12.227, 172.294, -11.098, 172.294); - p.cubicTo(-11.098, 172.294, 5.473, 172.294, 7.356, 173.047); - p.cubicTo(7.356, 173.047, 7.88, 175.289, 8.564, 178.68); - p.cubicTo(8.564, 178.68, -1.524, 176.67, -9.724, 178.47); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(43.88, 40.321); - p.cubicTo(71.601, 44.281, 97.121, 8.641, 98.881, -1.04); - p.cubicTo(100.641, -10.72, 90.521, -22.6, 90.521, -22.6); - p.cubicTo(91.841, -25.68, 87.001, -39.76, 81.721, -49); - p.cubicTo(76.441, -58.24, 60.54, -57.266, 43, -58.24); - p.cubicTo(27.16, -59.12, 8.68, -35.8, 7.36, -34.04); - p.cubicTo(6.04, -32.28, 12.2, 6.001, 13.52, 11.721); - p.cubicTo(14.84, 17.441, 12.2, 43.841, 12.2, 43.841); - p.cubicTo(46.44, 34.741, 16.16, 36.361, 43.88, 40.321); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ea8e51"; - sfp.strokeWidth = -1; - p.moveTo(8.088, -33.392); - p.cubicTo(6.792, -31.664, 12.84, 5.921, 14.136, 11.537); - p.cubicTo(15.432, 17.153, 12.84, 43.073, 12.84, 43.073); - p.cubicTo(45.512, 34.193, 16.728, 35.729, 43.944, 39.617); - p.cubicTo(71.161, 43.505, 96.217, 8.513, 97.945, -0.992); - p.cubicTo(99.673, -10.496, 89.737, -22.16, 89.737, -22.16); - p.cubicTo(91.033, -25.184, 86.281, -39.008, 81.097, -48.08); - p.cubicTo(75.913, -57.152, 60.302, -56.195, 43.08, -57.152); - p.cubicTo(27.528, -58.016, 9.384, -35.12, 8.088, -33.392); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#efaa7c"; - sfp.strokeWidth = -1; - p.moveTo(8.816, -32.744); - p.cubicTo(7.544, -31.048, 13.48, 5.841, 14.752, 11.353); - p.cubicTo(16.024, 16.865, 13.48, 42.305, 13.48, 42.305); - p.cubicTo(44.884, 33.145, 17.296, 35.097, 44.008, 38.913); - p.cubicTo(70.721, 42.729, 95.313, 8.385, 97.009, -0.944); - p.cubicTo(98.705, -10.272, 88.953, -21.72, 88.953, -21.72); - p.cubicTo(90.225, -24.688, 85.561, -38.256, 80.473, -47.16); - p.cubicTo(75.385, -56.064, 60.063, -55.125, 43.16, -56.064); - p.cubicTo(27.896, -56.912, 10.088, -34.44, 8.816, -32.744); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f4c6a8"; - sfp.strokeWidth = -1; - p.moveTo(9.544, -32.096); - p.cubicTo(8.296, -30.432, 14.12, 5.761, 15.368, 11.169); - p.cubicTo(16.616, 16.577, 14.12, 41.537, 14.12, 41.537); - p.cubicTo(43.556, 32.497, 17.864, 34.465, 44.072, 38.209); - p.cubicTo(70.281, 41.953, 94.409, 8.257, 96.073, -0.895); - p.cubicTo(97.737, -10.048, 88.169, -21.28, 88.169, -21.28); - p.cubicTo(89.417, -24.192, 84.841, -37.504, 79.849, -46.24); - p.cubicTo(74.857, -54.976, 59.824, -54.055, 43.24, -54.976); - p.cubicTo(28.264, -55.808, 10.792, -33.76, 9.544, -32.096); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f9e2d3"; - sfp.strokeWidth = -1; - p.moveTo(10.272, -31.448); - p.cubicTo(9.048, -29.816, 14.76, 5.681, 15.984, 10.985); - p.cubicTo(17.208, 16.289, 14.76, 40.769, 14.76, 40.769); - p.cubicTo(42.628, 31.849, 18.432, 33.833, 44.136, 37.505); - p.cubicTo(69.841, 41.177, 93.505, 8.129, 95.137, -0.848); - p.cubicTo(96.769, -9.824, 87.385, -20.84, 87.385, -20.84); - p.cubicTo(88.609, -23.696, 84.121, -36.752, 79.225, -45.32); - p.cubicTo(74.329, -53.888, 59.585, -52.985, 43.32, -53.888); - p.cubicTo(28.632, -54.704, 11.496, -33.08, 10.272, -31.448); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(44.2, 36.8); - p.cubicTo(69.4, 40.4, 92.601, 8, 94.201, -0.8); - p.cubicTo(95.801, -9.6, 86.601, -20.4, 86.601, -20.4); - p.cubicTo(87.801, -23.2, 83.4, -36, 78.6, -44.4); - p.cubicTo(73.8, -52.8, 59.346, -51.914, 43.4, -52.8); - p.cubicTo(29, -53.6, 12.2, -32.4, 11, -30.8); - p.cubicTo(9.8, -29.2, 15.4, 5.6, 16.6, 10.8); - p.cubicTo(17.8, 16, 15.4, 40, 15.4, 40); - p.cubicTo(40.9, 31.4, 19, 33.2, 44.2, 36.8); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(90.601, 2.8); - p.cubicTo(90.601, 2.8, 62.8, 10.4, 51.2, 8.8); - p.cubicTo(51.2, 8.8, 35.4, 2.2, 26.6, 24); - p.cubicTo(26.6, 24, 23, 31.2, 21, 33.2); - p.cubicTo(19, 35.2, 90.601, 2.8, 90.601, 2.8); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(94.401, 0.6); - p.cubicTo(94.401, 0.6, 65.4, 12.8, 55.4, 12.4); - p.cubicTo(55.4, 12.4, 39, 7.8, 30.6, 22.4); - p.cubicTo(30.6, 22.4, 22.2, 31.6, 19, 33.2); - p.cubicTo(19, 33.2, 18.6, 34.8, 25, 30.8); - p.lineTo(35.4, 36); - p.cubicTo(35.4, 36, 50.2, 45.6, 59.8, 29.6); - p.cubicTo(59.8, 29.6, 63.8, 18.4, 63.8, 16.4); - p.cubicTo(63.8, 14.4, 85, 8.8, 86.601, 8.4); - p.cubicTo(88.201, 8, 94.801, 3.8, 94.401, 0.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#99cc32"; - sfp.strokeWidth = -1; - p.moveTo(47, 36.514); - p.cubicTo(40.128, 36.514, 31.755, 32.649, 31.755, 26.4); - p.cubicTo(31.755, 20.152, 40.128, 13.887, 47, 13.887); - p.cubicTo(53.874, 13.887, 59.446, 18.952, 59.446, 25.2); - p.cubicTo(59.446, 31.449, 53.874, 36.514, 47, 36.514); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#659900"; - sfp.strokeWidth = -1; - p.moveTo(43.377, 19.83); - p.cubicTo(38.531, 20.552, 33.442, 22.055, 33.514, 21.839); - p.cubicTo(35.054, 17.22, 41.415, 13.887, 47, 13.887); - p.cubicTo(51.296, 13.887, 55.084, 15.865, 57.32, 18.875); - p.cubicTo(57.32, 18.875, 52.004, 18.545, 43.377, 19.83); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(55.4, 19.6); - p.cubicTo(55.4, 19.6, 51, 16.4, 51, 18.6); - p.cubicTo(51, 18.6, 54.6, 23, 55.4, 19.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(45.4, 27.726); - p.cubicTo(42.901, 27.726, 40.875, 25.7, 40.875, 23.2); - p.cubicTo(40.875, 20.701, 42.901, 18.675, 45.4, 18.675); - p.cubicTo(47.9, 18.675, 49.926, 20.701, 49.926, 23.2); - p.cubicTo(49.926, 25.7, 47.9, 27.726, 45.4, 27.726); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(-58.6, 14.4); - p.cubicTo(-58.6, 14.4, -61.8, -6.8, -59.4, -11.2); - p.cubicTo(-59.4, -11.2, -48.6, -21.2, -49, -24.8); - p.cubicTo(-49, -24.8, -49.4, -42.8, -50.6, -43.6); - p.cubicTo(-51.8, -44.4, -59.4, -50.4, -65.4, -44); - p.cubicTo(-65.4, -44, -75.8, -26, -75, -19.6); - p.lineTo(-75, -17.6); - p.cubicTo(-75, -17.6, -82.6, -18, -84.2, -16); - p.cubicTo(-84.2, -16, -85.4, -10.8, -86.6, -10.4); - p.cubicTo(-86.6, -10.4, -89.4, -8, -87.4, -5.2); - p.cubicTo(-87.4, -5.2, -89.4, -2.8, -89, 1.2); - p.lineTo(-81.4, 5.2); - p.cubicTo(-81.4, 5.2, -79.4, 19.6, -68.6, 24.8); - p.cubicTo(-63.764, 27.129, -60.6, 20.4, -58.6, 14.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(-59.6, 12.56); - p.cubicTo(-59.6, 12.56, -62.48, -6.52, -60.32, -10.48); - p.cubicTo(-60.32, -10.48, -50.6, -19.48, -50.96, -22.72); - p.cubicTo(-50.96, -22.72, -51.32, -38.92, -52.4, -39.64); - p.cubicTo(-53.48, -40.36, -60.32, -45.76, -65.72, -40); - p.cubicTo(-65.72, -40, -75.08, -23.8, -74.36, -18.04); - p.lineTo(-74.36, -16.24); - p.cubicTo(-74.36, -16.24, -81.2, -16.6, -82.64, -14.8); - p.cubicTo(-82.64, -14.8, -83.72, -10.12, -84.8, -9.76); - p.cubicTo(-84.8, -9.76, -87.32, -7.6, -85.52, -5.08); - p.cubicTo(-85.52, -5.08, -87.32, -2.92, -86.96, 0.68); - p.lineTo(-80.12, 4.28); - p.cubicTo(-80.12, 4.28, -78.32, 17.24, -68.6, 21.92); - p.cubicTo(-64.248, 24.015, -61.4, 17.96, -59.6, 12.56); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#eb955c"; - sfp.strokeWidth = -1; - p.moveTo(-51.05, -42.61); - p.cubicTo(-52.14, -43.47, -59.63, -49.24, -65.48, -43); - p.cubicTo(-65.48, -43, -75.62, -25.45, -74.84, -19.21); - p.lineTo(-74.84, -17.26); - p.cubicTo(-74.84, -17.26, -82.25, -17.65, -83.81, -15.7); - p.cubicTo(-83.81, -15.7, -84.98, -10.63, -86.15, -10.24); - p.cubicTo(-86.15, -10.24, -88.88, -7.9, -86.93, -5.17); - p.cubicTo(-86.93, -5.17, -88.88, -2.83, -88.49, 1.07); - p.lineTo(-81.08, 4.97); - p.cubicTo(-81.08, 4.97, -79.13, 19.01, -68.6, 24.08); - p.cubicTo(-63.886, 26.35, -60.8, 19.79, -58.85, 13.94); - p.cubicTo(-58.85, 13.94, -61.97, -6.73, -59.63, -11.02); - p.cubicTo(-59.63, -11.02, -49.1, -20.77, -49.49, -24.28); - p.cubicTo(-49.49, -24.28, -49.88, -41.83, -51.05, -42.61); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f2b892"; - sfp.strokeWidth = -1; - p.moveTo(-51.5, -41.62); - p.cubicTo(-52.48, -42.54, -59.86, -48.08, -65.56, -42); - p.cubicTo(-65.56, -42, -75.44, -24.9, -74.68, -18.82); - p.lineTo(-74.68, -16.92); - p.cubicTo(-74.68, -16.92, -81.9, -17.3, -83.42, -15.4); - p.cubicTo(-83.42, -15.4, -84.56, -10.46, -85.7, -10.08); - p.cubicTo(-85.7, -10.08, -88.36, -7.8, -86.46, -5.14); - p.cubicTo(-86.46, -5.14, -88.36, -2.86, -87.98, 0.94); - p.lineTo(-80.76, 4.74); - p.cubicTo(-80.76, 4.74, -78.86, 18.42, -68.6, 23.36); - p.cubicTo(-64.006, 25.572, -61, 19.18, -59.1, 13.48); - p.cubicTo(-59.1, 13.48, -62.14, -6.66, -59.86, -10.84); - p.cubicTo(-59.86, -10.84, -49.6, -20.34, -49.98, -23.76); - p.cubicTo(-49.98, -23.76, -50.36, -40.86, -51.5, -41.62); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#f8dcc8"; - sfp.strokeWidth = -1; - p.moveTo(-51.95, -40.63); - p.cubicTo(-52.82, -41.61, -60.09, -46.92, -65.64, -41); - p.cubicTo(-65.64, -41, -75.26, -24.35, -74.52, -18.43); - p.lineTo(-74.52, -16.58); - p.cubicTo(-74.52, -16.58, -81.55, -16.95, -83.03, -15.1); - p.cubicTo(-83.03, -15.1, -84.14, -10.29, -85.25, -9.92); - p.cubicTo(-85.25, -9.92, -87.84, -7.7, -85.99, -5.11); - p.cubicTo(-85.99, -5.11, -87.84, -2.89, -87.47, 0.81); - p.lineTo(-80.44, 4.51); - p.cubicTo(-80.44, 4.51, -78.59, 17.83, -68.6, 22.64); - p.cubicTo(-64.127, 24.794, -61.2, 18.57, -59.35, 13.02); - p.cubicTo(-59.35, 13.02, -62.31, -6.59, -60.09, -10.66); - p.cubicTo(-60.09, -10.66, -50.1, -19.91, -50.47, -23.24); - p.cubicTo(-50.47, -23.24, -50.84, -39.89, -51.95, -40.63); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(-59.6, 12.46); - p.cubicTo(-59.6, 12.46, -62.48, -6.52, -60.32, -10.48); - p.cubicTo(-60.32, -10.48, -50.6, -19.48, -50.96, -22.72); - p.cubicTo(-50.96, -22.72, -51.32, -38.92, -52.4, -39.64); - p.cubicTo(-53.16, -40.68, -60.32, -45.76, -65.72, -40); - p.cubicTo(-65.72, -40, -75.08, -23.8, -74.36, -18.04); - p.lineTo(-74.36, -16.24); - p.cubicTo(-74.36, -16.24, -81.2, -16.6, -82.64, -14.8); - p.cubicTo(-82.64, -14.8, -83.72, -10.12, -84.8, -9.76); - p.cubicTo(-84.8, -9.76, -87.32, -7.6, -85.52, -5.08); - p.cubicTo(-85.52, -5.08, -87.32, -2.92, -86.96, 0.68); - p.lineTo(-80.12, 4.28); - p.cubicTo(-80.12, 4.28, -78.32, 17.24, -68.6, 21.92); - p.cubicTo(-64.248, 24.015, -61.4, 17.86, -59.6, 12.46); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-62.7, 6.2); - p.cubicTo(-62.7, 6.2, -84.3, -4, -85.2, -4.8); - p.cubicTo(-85.2, -4.8, -76.1, 3.4, -75.3, 3.4); - p.cubicTo(-74.5, 3.4, -62.7, 6.2, -62.7, 6.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-79.8, 0); - p.cubicTo(-79.8, 0, -61.4, 3.6, -61.4, 8); - p.cubicTo(-61.4, 10.912, -61.643, 24.331, -67, 22.8); - p.cubicTo(-75.4, 20.4, -71.8, 6, -79.8, 0); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#99cc32"; - sfp.strokeWidth = -1; - p.moveTo(-71.4, 3.8); - p.cubicTo(-71.4, 3.8, -62.422, 5.274, -61.4, 8); - p.cubicTo(-60.8, 9.6, -60.137, 17.908, -65.6, 19); - p.cubicTo(-70.152, 19.911, -72.382, 9.69, -71.4, 3.8); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(14.595, 46.349); - p.cubicTo(14.098, 44.607, 15.409, 44.738, 17.2, 44.2); - p.cubicTo(19.2, 43.6, 31.4, 39.8, 32.2, 37.2); - p.cubicTo(33, 34.6, 46.2, 39, 46.2, 39); - p.cubicTo(48, 39.8, 52.4, 42.4, 52.4, 42.4); - p.cubicTo(57.2, 43.6, 63.8, 44, 63.8, 44); - p.cubicTo(66.2, 45, 69.6, 47.8, 69.6, 47.8); - p.cubicTo(84.2, 58, 96.601, 50.8, 96.601, 50.8); - p.cubicTo(116.601, 44.2, 110.601, 27, 110.601, 27); - p.cubicTo(107.601, 18, 110.801, 14.6, 110.801, 14.6); - p.cubicTo(111.001, 10.8, 118.201, 17.2, 118.201, 17.2); - p.cubicTo(120.801, 21.4, 121.601, 26.4, 121.601, 26.4); - p.cubicTo(129.601, 37.6, 126.201, 19.8, 126.201, 19.8); - p.cubicTo(126.401, 18.8, 123.601, 15.2, 123.601, 14); - p.cubicTo(123.601, 12.8, 121.801, 9.4, 121.801, 9.4); - p.cubicTo(118.801, 6, 121.201, -1, 121.201, -1); - p.cubicTo(123.001, -14.8, 120.801, -13, 120.801, -13); - p.cubicTo(119.601, -14.8, 110.401, -4.8, 110.401, -4.8); - p.cubicTo(108.201, -1.4, 102.201, 0.2, 102.201, 0.2); - p.cubicTo(99.401, 2, 96.001, 0.6, 96.001, 0.6); - p.cubicTo(93.401, 0.2, 87.801, 7.2, 87.801, 7.2); - p.cubicTo(90.601, 7, 93.001, 11.4, 95.401, 11.6); - p.cubicTo(97.801, 11.8, 99.601, 9.2, 101.201, 8.6); - p.cubicTo(102.801, 8, 105.601, 13.8, 105.601, 13.8); - p.cubicTo(106.001, 16.4, 100.401, 21.2, 100.401, 21.2); - p.cubicTo(100.001, 25.8, 98.401, 24.2, 98.401, 24.2); - p.cubicTo(95.401, 23.6, 94.201, 27.4, 93.201, 32); - p.cubicTo(92.201, 36.6, 88.001, 37, 88.001, 37); - p.cubicTo(86.401, 44.4, 85.2, 41.4, 85.2, 41.4); - p.cubicTo(85, 35.8, 79, 41.6, 79, 41.6); - p.cubicTo(77.8, 43.6, 73.2, 41.4, 73.2, 41.4); - p.cubicTo(66.4, 39.4, 68.8, 37.4, 68.8, 37.4); - p.cubicTo(70.6, 35.2, 81.8, 37.4, 81.8, 37.4); - p.cubicTo(84, 35.8, 76, 31.8, 76, 31.8); - p.cubicTo(75.4, 30, 76.4, 25.6, 76.4, 25.6); - p.cubicTo(77.6, 22.4, 84.4, 16.8, 84.4, 16.8); - p.cubicTo(93.801, 15.6, 91.001, 14, 91.001, 14); - p.cubicTo(84.801, 8.8, 79, 16.4, 79, 16.4); - p.cubicTo(76.8, 22.6, 59.4, 37.6, 59.4, 37.6); - p.cubicTo(54.6, 41, 57.2, 34.2, 53.2, 37.6); - p.cubicTo(49.2, 41, 28.6, 32, 28.6, 32); - p.cubicTo(17.038, 30.807, 14.306, 46.549, 10.777, 43.429); - p.cubicTo(10.777, 43.429, 16.195, 51.949, 14.595, 46.349); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(209.401, -120); - p.cubicTo(209.401, -120, 183.801, -112, 181.001, -93.2); - p.cubicTo(181.001, -93.2, 178.601, -70.4, 199.001, -52.8); - p.cubicTo(199.001, -52.8, 199.401, -46.4, 201.401, -43.2); - p.cubicTo(201.401, -43.2, 199.801, -38.4, 218.601, -46); - p.lineTo(245.801, -54.4); - p.cubicTo(245.801, -54.4, 252.201, -56.8, 257.401, -65.6); - p.cubicTo(262.601, -74.4, 277.801, -93.2, 274.201, -118.4); - p.cubicTo(274.201, -118.4, 275.401, -129.6, 269.401, -130); - p.cubicTo(269.401, -130, 261.001, -131.6, 253.801, -124); - p.cubicTo(253.801, -124, 247.001, -120.8, 244.601, -121.2); - p.lineTo(209.401, -120); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(264.022, -120.99); - p.cubicTo(264.022, -120.99, 266.122, -129.92, 261.282, -125.08); - p.cubicTo(261.282, -125.08, 254.242, -119.36, 246.761, -119.36); - p.cubicTo(246.761, -119.36, 232.241, -117.16, 227.841, -103.96); - p.cubicTo(227.841, -103.96, 223.881, -77.12, 231.801, -71.4); - p.cubicTo(231.801, -71.4, 236.641, -63.92, 243.681, -70.52); - p.cubicTo(250.722, -77.12, 266.222, -107.35, 264.022, -120.99); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#323232"; - sfp.strokeWidth = -1; - p.moveTo(263.648, -120.632); - p.cubicTo(263.648, -120.632, 265.738, -129.376, 260.986, -124.624); - p.cubicTo(260.986, -124.624, 254.074, -119.008, 246.729, -119.008); - p.cubicTo(246.729, -119.008, 232.473, -116.848, 228.153, -103.888); - p.cubicTo(228.153, -103.888, 224.265, -77.536, 232.041, -71.92); - p.cubicTo(232.041, -71.92, 236.793, -64.576, 243.705, -71.056); - p.cubicTo(250.618, -77.536, 265.808, -107.24, 263.648, -120.632); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#666666"; - sfp.strokeWidth = -1; - p.moveTo(263.274, -120.274); - p.cubicTo(263.274, -120.274, 265.354, -128.832, 260.69, -124.168); - p.cubicTo(260.69, -124.168, 253.906, -118.656, 246.697, -118.656); - p.cubicTo(246.697, -118.656, 232.705, -116.536, 228.465, -103.816); - p.cubicTo(228.465, -103.816, 224.649, -77.952, 232.281, -72.44); - p.cubicTo(232.281, -72.44, 236.945, -65.232, 243.729, -71.592); - p.cubicTo(250.514, -77.952, 265.394, -107.13, 263.274, -120.274); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#999999"; - sfp.strokeWidth = -1; - p.moveTo(262.9, -119.916); - p.cubicTo(262.9, -119.916, 264.97, -128.288, 260.394, -123.712); - p.cubicTo(260.394, -123.712, 253.738, -118.304, 246.665, -118.304); - p.cubicTo(246.665, -118.304, 232.937, -116.224, 228.777, -103.744); - p.cubicTo(228.777, -103.744, 225.033, -78.368, 232.521, -72.96); - p.cubicTo(232.521, -72.96, 237.097, -65.888, 243.753, -72.128); - p.cubicTo(250.41, -78.368, 264.98, -107.02, 262.9, -119.916); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(262.526, -119.558); - p.cubicTo(262.526, -119.558, 264.586, -127.744, 260.098, -123.256); - p.cubicTo(260.098, -123.256, 253.569, -117.952, 246.633, -117.952); - p.cubicTo(246.633, -117.952, 233.169, -115.912, 229.089, -103.672); - p.cubicTo(229.089, -103.672, 225.417, -78.784, 232.761, -73.48); - p.cubicTo(232.761, -73.48, 237.249, -66.544, 243.777, -72.664); - p.cubicTo(250.305, -78.784, 264.566, -106.91, 262.526, -119.558); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(262.151, -119.2); - p.cubicTo(262.151, -119.2, 264.201, -127.2, 259.801, -122.8); - p.cubicTo(259.801, -122.8, 253.401, -117.6, 246.601, -117.6); - p.cubicTo(246.601, -117.6, 233.401, -115.6, 229.401, -103.6); - p.cubicTo(229.401, -103.6, 225.801, -79.2, 233.001, -74); - p.cubicTo(233.001, -74, 237.401, -67.2, 243.801, -73.2); - p.cubicTo(250.201, -79.2, 264.151, -106.8, 262.151, -119.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#992600"; - sfp.strokeWidth = -1; - p.moveTo(50.6, 84); - p.cubicTo(50.6, 84, 30.2, 64.8, 22.2, 64); - p.cubicTo(22.2, 64, -12.2, 60, -27, 78); - p.cubicTo(-27, 78, -9.4, 57.6, 18.2, 63.2); - p.cubicTo(18.2, 63.2, -3.4, 58.8, -15.8, 62); - p.cubicTo(-15.8, 62, -32.6, 62, -42.2, 76); - p.lineTo(-45, 80.8); - p.cubicTo(-45, 80.8, -41, 66, -22.6, 60); - p.cubicTo(-22.6, 60, 0.2, 55.2, 11, 60); - p.cubicTo(11, 60, -10.6, 53.2, -20.6, 55.2); - p.cubicTo(-20.6, 55.2, -51, 52.8, -63.8, 79.2); - p.cubicTo(-63.8, 79.2, -59.8, 64.8, -45, 57.6); - p.cubicTo(-45, 57.6, -31.4, 48.8, -11, 51.6); - p.cubicTo(-11, 51.6, 3.4, 54.8, 8.6, 57.2); - p.cubicTo(13.8, 59.6, 12.6, 56.8, 4.2, 52); - p.cubicTo(4.2, 52, -1.4, 42, -15.4, 42.4); - p.cubicTo(-15.4, 42.4, -58.2, 46, -68.6, 58); - p.cubicTo(-68.6, 58, -55, 46.8, -44.6, 44); - p.cubicTo(-44.6, 44, -22.2, 36, -13.8, 36.8); - p.cubicTo(-13.8, 36.8, 11, 37.8, 18.6, 33.8); - p.cubicTo(18.6, 33.8, 7.4, 38.8, 10.6, 42); - p.cubicTo(13.8, 45.2, 20.6, 52.8, 20.6, 54); - p.cubicTo(20.6, 55.2, 44.8, 77.3, 48.4, 81.7); - p.lineTo(50.6, 84); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(189, 278); - p.cubicTo(189, 278, 173.5, 241.5, 161, 232); - p.cubicTo(161, 232, 187, 248, 190.5, 266); - p.cubicTo(190.5, 266, 190.5, 276, 189, 278); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(236, 285.5); - p.cubicTo(236, 285.5, 209.5, 230.5, 191, 206.5); - p.cubicTo(191, 206.5, 234.5, 244, 239.5, 270.5); - p.lineTo(240, 276); - p.lineTo(237, 273.5); - p.cubicTo(237, 273.5, 236.5, 282.5, 236, 285.5); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(292.5, 237); - p.cubicTo(292.5, 237, 230, 177.5, 228.5, 175); - p.cubicTo(228.5, 175, 289, 241, 292, 248.5); - p.cubicTo(292, 248.5, 290, 239.5, 292.5, 237); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(104, 280.5); - p.cubicTo(104, 280.5, 123.5, 228.5, 142.5, 251); - p.cubicTo(142.5, 251, 157.5, 261, 157, 264); - p.cubicTo(157, 264, 153, 257.5, 135, 258); - p.cubicTo(135, 258, 116, 255, 104, 280.5); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(294.5, 153); - p.cubicTo(294.5, 153, 249.5, 124.5, 242, 123); - p.cubicTo(230.193, 120.639, 291.5, 152, 296.5, 162.5); - p.cubicTo(296.5, 162.5, 298.5, 160, 294.5, 153); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(143.801, 259.601); - p.cubicTo(143.801, 259.601, 164.201, 257.601, 171.001, 250.801); - p.lineTo(175.401, 254.401); - p.lineTo(193.001, 216.001); - p.lineTo(196.601, 221.201); - p.cubicTo(196.601, 221.201, 211.001, 206.401, 210.201, 198.401); - p.cubicTo(209.401, 190.401, 223.001, 204.401, 223.001, 204.401); - p.cubicTo(223.001, 204.401, 222.201, 192.801, 229.401, 199.601); - p.cubicTo(229.401, 199.601, 227.001, 184.001, 235.401, 192.001); - p.cubicTo(235.401, 192.001, 224.864, 161.844, 247.401, 187.601); - p.cubicTo(253.001, 194.001, 248.601, 187.201, 248.601, 187.201); - p.cubicTo(248.601, 187.201, 222.601, 139.201, 244.201, 153.601); - p.cubicTo(244.201, 153.601, 246.201, 130.801, 245.001, 126.401); - p.cubicTo(243.801, 122.001, 241.801, 99.6, 237.001, 94.4); - p.cubicTo(232.201, 89.2, 237.401, 87.6, 243.001, 92.8); - p.cubicTo(243.001, 92.8, 231.801, 68.8, 245.001, 80.8); - p.cubicTo(245.001, 80.8, 241.401, 65.6, 237.001, 62.8); - p.cubicTo(237.001, 62.8, 231.401, 45.6, 246.601, 56.4); - p.cubicTo(246.601, 56.4, 242.201, 44, 239.001, 40.8); - p.cubicTo(239.001, 40.8, 227.401, 13.2, 234.601, 18); - p.lineTo(239.001, 21.6); - p.cubicTo(239.001, 21.6, 232.201, 7.6, 238.601, 12); - p.cubicTo(245.001, 16.4, 245.001, 16, 245.001, 16); - p.cubicTo(245.001, 16, 223.801, -17.2, 244.201, 0.4); - p.cubicTo(244.201, 0.4, 236.042, -13.518, 232.601, -20.4); - p.cubicTo(232.601, -20.4, 213.801, -40.8, 228.201, -34.4); - p.lineTo(233.001, -32.8); - p.cubicTo(233.001, -32.8, 224.201, -42.8, 216.201, -44.4); - p.cubicTo(208.201, -46, 218.601, -52.4, 225.001, -50.4); - p.cubicTo(231.401, -48.4, 247.001, -40.8, 247.001, -40.8); - p.cubicTo(247.001, -40.8, 259.801, -22, 263.801, -21.6); - p.cubicTo(263.801, -21.6, 243.801, -29.2, 249.801, -21.2); - p.cubicTo(249.801, -21.2, 264.201, -7.2, 257.001, -7.6); - p.cubicTo(257.001, -7.6, 251.001, -0.4, 255.801, 8.4); - p.cubicTo(255.801, 8.4, 237.342, -9.991, 252.201, 15.6); - p.lineTo(259.001, 32); - p.cubicTo(259.001, 32, 234.601, 7.2, 245.801, 29.2); - p.cubicTo(245.801, 29.2, 263.001, 52.8, 265.001, 53.2); - p.cubicTo(267.001, 53.6, 271.401, 62.4, 271.401, 62.4); - p.lineTo(267.001, 60.4); - p.lineTo(272.201, 69.2); - p.cubicTo(272.201, 69.2, 261.001, 57.2, 267.001, 70.4); - p.lineTo(272.601, 84.8); - p.cubicTo(272.601, 84.8, 252.201, 62.8, 265.801, 92.4); - p.cubicTo(265.801, 92.4, 249.401, 87.2, 258.201, 104.4); - p.cubicTo(258.201, 104.4, 256.601, 120.401, 257.001, 125.601); - p.cubicTo(257.401, 130.801, 258.601, 159.201, 254.201, 167.201); - p.cubicTo(249.801, 175.201, 260.201, 194.401, 262.201, 198.401); - p.cubicTo(264.201, 202.401, 267.801, 213.201, 259.001, 204.001); - p.cubicTo(250.201, 194.801, 254.601, 200.401, 256.601, 209.201); - p.cubicTo(258.601, 218.001, 264.601, 233.601, 263.801, 239.201); - p.cubicTo(263.801, 239.201, 262.601, 240.401, 259.401, 236.801); - p.cubicTo(259.401, 236.801, 244.601, 214.001, 246.201, 228.401); - p.cubicTo(246.201, 228.401, 245.001, 236.401, 241.801, 245.201); - p.cubicTo(241.801, 245.201, 238.601, 256.001, 238.601, 247.201); - p.cubicTo(238.601, 247.201, 235.401, 230.401, 232.601, 238.001); - p.cubicTo(229.801, 245.601, 226.201, 251.601, 223.401, 254.001); - p.cubicTo(220.601, 256.401, 215.401, 233.601, 214.201, 244.001); - p.cubicTo(214.201, 244.001, 202.201, 231.601, 197.401, 248.001); - p.lineTo(185.801, 264.401); - p.cubicTo(185.801, 264.401, 185.401, 252.001, 184.201, 258.001); - p.cubicTo(184.201, 258.001, 154.201, 264.001, 143.801, 259.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(109.401, -97.2); - p.cubicTo(109.401, -97.2, 97.801, -105.2, 93.801, -104.8); - p.cubicTo(89.801, -104.4, 121.401, -113.6, 162.601, -86); - p.cubicTo(162.601, -86, 167.401, -83.2, 171.001, -83.6); - p.cubicTo(171.001, -83.6, 174.201, -81.2, 171.401, -77.6); - p.cubicTo(171.401, -77.6, 162.601, -68, 173.801, -56.8); - p.cubicTo(173.801, -56.8, 192.201, -50, 186.601, -58.8); - p.cubicTo(186.601, -58.8, 197.401, -54.8, 199.801, -50.8); - p.cubicTo(202.201, -46.8, 201.001, -50.8, 201.001, -50.8); - p.cubicTo(201.001, -50.8, 194.601, -58, 188.601, -63.2); - p.cubicTo(188.601, -63.2, 183.401, -65.2, 180.601, -73.6); - p.cubicTo(177.801, -82, 175.401, -92, 179.801, -95.2); - p.cubicTo(179.801, -95.2, 175.801, -90.8, 176.601, -94.8); - p.cubicTo(177.401, -98.8, 181.001, -102.4, 182.601, -102.8); - p.cubicTo(184.201, -103.2, 200.601, -119, 207.401, -119.4); - p.cubicTo(207.401, -119.4, 198.201, -118, 195.201, -119); - p.cubicTo(192.201, -120, 165.601, -131.4, 159.601, -132.6); - p.cubicTo(159.601, -132.6, 142.801, -139.2, 154.801, -137.2); - p.cubicTo(154.801, -137.2, 190.601, -133.4, 208.801, -120.2); - p.cubicTo(208.801, -120.2, 201.601, -128.6, 183.201, -135.6); - p.cubicTo(183.201, -135.6, 161.001, -148.2, 125.801, -143.2); - p.cubicTo(125.801, -143.2, 108.001, -140, 100.201, -138.2); - p.cubicTo(100.201, -138.2, 97.601, -138.8, 97.001, -139.2); - p.cubicTo(96.401, -139.6, 84.6, -148.6, 57, -141.6); - p.cubicTo(57, -141.6, 40, -137, 31.4, -132.2); - p.cubicTo(31.4, -132.2, 16.2, -131, 12.6, -127.8); - p.cubicTo(12.6, -127.8, -6, -113.2, -8, -112.4); - p.cubicTo(-10, -111.6, -21.4, -104, -22.2, -103.6); - p.cubicTo(-22.2, -103.6, 2.4, -110.2, 4.8, -112.6); - p.cubicTo(7.2, -115, 24.6, -117.6, 27, -116.2); - p.cubicTo(29.4, -114.8, 37.8, -115.4, 28.2, -114.8); - p.cubicTo(28.2, -114.8, 103.801, -100, 104.601, -98); - p.cubicTo(105.401, -96, 109.401, -97.2, 109.401, -97.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(180.801, -106.4); - p.cubicTo(180.801, -106.4, 170.601, -113.8, 168.601, -113.8); - p.cubicTo(166.601, -113.8, 154.201, -124, 150.001, -123.6); - p.cubicTo(145.801, -123.2, 133.601, -133.2, 106.201, -125); - p.cubicTo(106.201, -125, 105.601, -127, 109.201, -127.8); - p.cubicTo(109.201, -127.8, 115.601, -130, 116.001, -130.6); - p.cubicTo(116.001, -130.6, 136.201, -134.8, 143.401, -131.2); - p.cubicTo(143.401, -131.2, 152.601, -128.6, 158.801, -122.4); - p.cubicTo(158.801, -122.4, 170.001, -119.2, 173.201, -120.2); - p.cubicTo(173.201, -120.2, 182.001, -118, 182.401, -116.2); - p.cubicTo(182.401, -116.2, 188.201, -113.2, 186.401, -110.6); - p.cubicTo(186.401, -110.6, 186.801, -109, 180.801, -106.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(168.33, -108.509); - p.cubicTo(169.137, -107.877, 170.156, -107.779, 170.761, -106.97); - p.cubicTo(170.995, -106.656, 170.706, -106.33, 170.391, -106.233); - p.cubicTo(169.348, -105.916, 168.292, -106.486, 167.15, -105.898); - p.cubicTo(166.748, -105.691, 166.106, -105.873, 165.553, -106.022); - p.cubicTo(163.921, -106.463, 162.092, -106.488, 160.401, -105.8); - p.cubicTo(158.416, -106.929, 156.056, -106.345, 153.975, -107.346); - p.cubicTo(153.917, -107.373, 153.695, -107.027, 153.621, -107.054); - p.cubicTo(150.575, -108.199, 146.832, -107.916, 144.401, -110.2); - p.cubicTo(141.973, -110.612, 139.616, -111.074, 137.188, -111.754); - p.cubicTo(135.37, -112.263, 133.961, -113.252, 132.341, -114.084); - p.cubicTo(130.964, -114.792, 129.507, -115.314, 127.973, -115.686); - p.cubicTo(126.11, -116.138, 124.279, -116.026, 122.386, -116.546); - p.cubicTo(122.293, -116.571, 122.101, -116.227, 122.019, -116.254); - p.cubicTo(121.695, -116.362, 121.405, -116.945, 121.234, -116.892); - p.cubicTo(119.553, -116.37, 118.065, -117.342, 116.401, -117); - p.cubicTo(115.223, -118.224, 113.495, -117.979, 111.949, -118.421); - p.cubicTo(108.985, -119.269, 105.831, -117.999, 102.801, -119); - p.cubicTo(106.914, -120.842, 111.601, -119.61, 115.663, -121.679); - p.cubicTo(117.991, -122.865, 120.653, -121.763, 123.223, -122.523); - p.cubicTo(123.71, -122.667, 124.401, -122.869, 124.801, -122.2); - p.cubicTo(124.935, -122.335, 125.117, -122.574, 125.175, -122.546); - p.cubicTo(127.625, -121.389, 129.94, -120.115, 132.422, -119.049); - p.cubicTo(132.763, -118.903, 133.295, -119.135, 133.547, -118.933); - p.cubicTo(135.067, -117.717, 137.01, -117.82, 138.401, -116.6); - p.cubicTo(140.099, -117.102, 141.892, -116.722, 143.621, -117.346); - p.cubicTo(143.698, -117.373, 143.932, -117.032, 143.965, -117.054); - p.cubicTo(145.095, -117.802, 146.25, -117.531, 147.142, -117.227); - p.cubicTo(147.48, -117.112, 148.143, -116.865, 148.448, -116.791); - p.cubicTo(149.574, -116.515, 150.43, -116.035, 151.609, -115.852); - p.cubicTo(151.723, -115.834, 151.908, -116.174, 151.98, -116.146); - p.cubicTo(153.103, -115.708, 154.145, -115.764, 154.801, -114.6); - p.cubicTo(154.936, -114.735, 155.101, -114.973, 155.183, -114.946); - p.cubicTo(156.21, -114.608, 156.859, -113.853, 157.96, -113.612); - p.cubicTo(158.445, -113.506, 159.057, -112.88, 159.633, -112.704); - p.cubicTo(162.025, -111.973, 163.868, -110.444, 166.062, -109.549); - p.cubicTo(166.821, -109.239, 167.697, -109.005, 168.33, -108.509); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(91.696, -122.739); - p.cubicTo(89.178, -124.464, 86.81, -125.57, 84.368, -127.356); - p.cubicTo(84.187, -127.489, 83.827, -127.319, 83.625, -127.441); - p.cubicTo(82.618, -128.05, 81.73, -128.631, 80.748, -129.327); - p.cubicTo(80.209, -129.709, 79.388, -129.698, 78.88, -129.956); - p.cubicTo(76.336, -131.248, 73.707, -131.806, 71.2, -133); - p.cubicTo(71.882, -133.638, 73.004, -133.394, 73.6, -134.2); - p.cubicTo(73.795, -133.92, 74.033, -133.636, 74.386, -133.827); - p.cubicTo(76.064, -134.731, 77.914, -134.884, 79.59, -134.794); - p.cubicTo(81.294, -134.702, 83.014, -134.397, 84.789, -134.125); - p.cubicTo(85.096, -134.078, 85.295, -133.555, 85.618, -133.458); - p.cubicTo(87.846, -132.795, 90.235, -133.32, 92.354, -132.482); - p.cubicTo(93.945, -131.853, 95.515, -131.03, 96.754, -129.755); - p.cubicTo(97.006, -129.495, 96.681, -129.194, 96.401, -129); - p.cubicTo(96.789, -129.109, 97.062, -128.903, 97.173, -128.59); - p.cubicTo(97.257, -128.351, 97.257, -128.049, 97.173, -127.81); - p.cubicTo(97.061, -127.498, 96.782, -127.397, 96.408, -127.346); - p.cubicTo(95.001, -127.156, 96.773, -128.536, 96.073, -128.088); - p.cubicTo(94.8, -127.274, 95.546, -125.868, 94.801, -124.6); - p.cubicTo(94.521, -124.794, 94.291, -125.012, 94.401, -125.4); - p.cubicTo(94.635, -124.878, 94.033, -124.588, 93.865, -124.272); - p.cubicTo(93.48, -123.547, 92.581, -122.132, 91.696, -122.739); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(59.198, -115.391); - p.cubicTo(56.044, -116.185, 52.994, -116.07, 49.978, -117.346); - p.cubicTo(49.911, -117.374, 49.688, -117.027, 49.624, -117.054); - p.cubicTo(48.258, -117.648, 47.34, -118.614, 46.264, -119.66); - p.cubicTo(45.351, -120.548, 43.693, -120.161, 42.419, -120.648); - p.cubicTo(42.095, -120.772, 41.892, -121.284, 41.591, -121.323); - p.cubicTo(40.372, -121.48, 39.445, -122.429, 38.4, -123); - p.cubicTo(40.736, -123.795, 43.147, -123.764, 45.609, -124.148); - p.cubicTo(45.722, -124.166, 45.867, -123.845, 46, -123.845); - p.cubicTo(46.136, -123.845, 46.266, -124.066, 46.4, -124.2); - p.cubicTo(46.595, -123.92, 46.897, -123.594, 47.154, -123.848); - p.cubicTo(47.702, -124.388, 48.258, -124.198, 48.798, -124.158); - p.cubicTo(48.942, -124.148, 49.067, -123.845, 49.2, -123.845); - p.cubicTo(49.336, -123.845, 49.467, -124.156, 49.6, -124.156); - p.cubicTo(49.736, -124.155, 49.867, -123.845, 50, -123.845); - p.cubicTo(50.136, -123.845, 50.266, -124.066, 50.4, -124.2); - p.cubicTo(51.092, -123.418, 51.977, -123.972, 52.799, -123.793); - p.cubicTo(53.837, -123.566, 54.104, -122.418, 55.178, -122.12); - p.cubicTo(59.893, -120.816, 64.03, -118.671, 68.393, -116.584); - p.cubicTo(68.7, -116.437, 68.91, -116.189, 68.8, -115.8); - p.cubicTo(69.067, -115.8, 69.38, -115.888, 69.57, -115.756); - p.cubicTo(70.628, -115.024, 71.669, -114.476, 72.366, -113.378); - p.cubicTo(72.582, -113.039, 72.253, -112.632, 72.02, -112.684); - p.cubicTo(67.591, -113.679, 63.585, -114.287, 59.198, -115.391); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(45.338, -71.179); - p.cubicTo(43.746, -72.398, 43.162, -74.429, 42.034, -76.221); - p.cubicTo(41.82, -76.561, 42.094, -76.875, 42.411, -76.964); - p.cubicTo(42.971, -77.123, 43.514, -76.645, 43.923, -76.443); - p.cubicTo(45.668, -75.581, 47.203, -74.339, 49.2, -74.2); - p.cubicTo(51.19, -71.966, 55.45, -71.581, 55.457, -68.2); - p.cubicTo(55.458, -67.341, 54.03, -68.259, 53.6, -67.4); - p.cubicTo(51.149, -68.403, 48.76, -68.3, 46.38, -69.767); - p.cubicTo(45.763, -70.148, 46.093, -70.601, 45.338, -71.179); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cc7226"; - sfp.strokeWidth = -1; - p.moveTo(17.8, -123.756); - p.cubicTo(17.935, -123.755, 24.966, -123.522, 24.949, -123.408); - p.cubicTo(24.904, -123.099, 17.174, -122.05, 16.81, -122.22); - p.cubicTo(16.646, -122.296, 9.134, -119.866, 9, -120); - p.cubicTo(9.268, -120.135, 17.534, -123.756, 17.8, -123.756); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(33.2, -114); - p.cubicTo(33.2, -114, 18.4, -112.2, 14, -111); - p.cubicTo(9.6, -109.8, -9, -102.2, -12, -100.2); - p.cubicTo(-12, -100.2, -25.4, -94.8, -42.4, -74.8); - p.cubicTo(-42.4, -74.8, -34.8, -78.2, -32.6, -81); - p.cubicTo(-32.6, -81, -19, -93.6, -19.2, -91); - p.cubicTo(-19.2, -91, -7, -99.6, -7.6, -97.4); - p.cubicTo(-7.6, -97.4, 16.8, -108.6, 14.8, -105.4); - p.cubicTo(14.8, -105.4, 36.4, -110, 35.4, -108); - p.cubicTo(35.4, -108, 54.2, -103.6, 51.4, -103.4); - p.cubicTo(51.4, -103.4, 45.6, -102.2, 52, -98.6); - p.cubicTo(52, -98.6, 48.6, -94.2, 43.2, -98.2); - p.cubicTo(37.8, -102.2, 40.8, -100, 35.8, -99); - p.cubicTo(35.8, -99, 33.2, -98.2, 28.6, -102.2); - p.cubicTo(28.6, -102.2, 23, -106.8, 14.2, -103.2); - p.cubicTo(14.2, -103.2, -16.4, -90.6, -18.4, -90); - p.cubicTo(-18.4, -90, -22, -87.2, -24.4, -83.6); - p.cubicTo(-24.4, -83.6, -30.2, -79.2, -33.2, -77.8); - p.cubicTo(-33.2, -77.8, -46, -66.2, -47.2, -64.8); - p.cubicTo(-47.2, -64.8, -50.6, -59.6, -51.4, -59.2); - p.cubicTo(-51.4, -59.2, -45, -63, -43, -65); - p.cubicTo(-43, -65, -29, -75, -23.6, -75.8); - p.cubicTo(-23.6, -75.8, -19.2, -78.8, -18.4, -80.2); - p.cubicTo(-18.4, -80.2, -4, -89.4, 0.2, -89.4); - p.cubicTo(0.2, -89.4, 9.4, -84.2, 11.8, -91.2); - p.cubicTo(11.8, -91.2, 17.6, -93, 23.2, -91.8); - p.cubicTo(23.2, -91.8, 26.4, -94.4, 25.6, -96.6); - p.cubicTo(25.6, -96.6, 27.2, -98.4, 28.2, -94.6); - p.cubicTo(28.2, -94.6, 31.6, -91, 36.4, -93); - p.cubicTo(36.4, -93, 40.4, -93.2, 38.4, -90.8); - p.cubicTo(38.4, -90.8, 34, -87, 22.2, -86.8); - p.cubicTo(22.2, -86.8, 9.8, -86.2, -6.6, -78.6); - p.cubicTo(-6.6, -78.6, -36.4, -68.2, -45.6, -57.8); - p.cubicTo(-45.6, -57.8, -52, -49, -57.4, -47.8); - p.cubicTo(-57.4, -47.8, -63.2, -47, -69.2, -39.6); - p.cubicTo(-69.2, -39.6, -59.4, -45.4, -50.4, -45.4); - p.cubicTo(-50.4, -45.4, -46.4, -47.8, -50.2, -44.2); - p.cubicTo(-50.2, -44.2, -53.8, -36.6, -52.2, -31.2); - p.cubicTo(-52.2, -31.2, -52.8, -26, -53.6, -24.4); - p.cubicTo(-53.6, -24.4, -61.4, -11.6, -61.4, -9.2); - p.cubicTo(-61.4, -6.8, -60.2, 3, -59.8, 3.6); - p.cubicTo(-59.4, 4.2, -60.8, 2, -57, 4.4); - p.cubicTo(-53.2, 6.8, -50.4, 8.4, -49.6, 11.2); - p.cubicTo(-48.8, 14, -51.6, 5.8, -51.8, 4); - p.cubicTo(-52, 2.2, -56.2, -5, -55.4, -7.4); - p.cubicTo(-55.4, -7.4, -54.4, -6.4, -53.6, -5); - p.cubicTo(-53.6, -5, -54.2, -5.6, -53.6, -9.2); - p.cubicTo(-53.6, -9.2, -52.8, -14.4, -51.4, -17.6); - p.cubicTo(-50, -20.8, -48, -24.6, -47.6, -25.4); - p.cubicTo(-47.2, -26.2, -47.2, -32, -45.8, -29.4); - p.lineTo(-42.4, -26.8); - p.cubicTo(-42.4, -26.8, -45.2, -29.4, -43, -31.6); - p.cubicTo(-43, -31.6, -44, -37.2, -42.2, -39.8); - p.cubicTo(-42.2, -39.8, -35.2, -48.2, -33.6, -49.2); - p.cubicTo(-32, -50.2, -33.4, -49.8, -33.4, -49.8); - p.cubicTo(-33.4, -49.8, -27.4, -54, -33.2, -52.4); - p.cubicTo(-33.2, -52.4, -37.2, -50.8, -40.2, -50.8); - p.cubicTo(-40.2, -50.8, -47.8, -48.8, -43.8, -53); - p.cubicTo(-39.8, -57.2, -29.8, -62.6, -26, -62.4); - p.lineTo(-25.2, -60.8); - p.lineTo(-14, -63.2); - p.lineTo(-15.2, -62.4); - p.cubicTo(-15.2, -62.4, -15.4, -62.6, -11.2, -63); - p.cubicTo(-7, -63.4, -1.2, -62, 0.2, -63.8); - p.cubicTo(1.6, -65.6, 5, -66.6, 4.6, -65.2); - p.cubicTo(4.2, -63.8, 4, -61.8, 4, -61.8); - p.cubicTo(4, -61.8, 9, -67.6, 8.4, -65.4); - p.cubicTo(7.8, -63.2, -0.4, -58, -1.8, -51.8); - p.lineTo(8.6, -60); - p.lineTo(12.2, -63); - p.cubicTo(12.2, -63, 15.8, -60.8, 16, -62.4); - p.cubicTo(16.2, -64, 20.8, -69.8, 22, -69.6); - p.cubicTo(23.2, -69.4, 25.2, -72.2, 25, -69.6); - p.cubicTo(24.8, -67, 32.4, -61.6, 32.4, -61.6); - p.cubicTo(32.4, -61.6, 35.6, -63.4, 37, -62); - p.cubicTo(38.4, -60.6, 42.6, -81.8, 42.6, -81.8); - p.lineTo(67.6, -92.4); - p.lineTo(111.201, -95.8); - p.lineTo(94.201, -102.6); - p.lineTo(33.2, -114); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#4c0000"; - sfp.strokeWidth = 2; - p.moveTo(51.4, 85); - p.cubicTo(51.4, 85, 36.4, 68.2, 28, 65.6); - p.cubicTo(28, 65.6, 14.6, 58.8, -10, 66.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#4c0000"; - sfp.strokeWidth = 2; - p.moveTo(24.8, 64.2); - p.cubicTo(24.8, 64.2, -0.4, 56.2, -15.8, 60.4); - p.cubicTo(-15.8, 60.4, -34.2, 62.4, -42.6, 76.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#4c0000"; - sfp.strokeWidth = 2; - p.moveTo(21.2, 63); - p.cubicTo(21.2, 63, 4.2, 55.8, -10.6, 53.6); - p.cubicTo(-10.6, 53.6, -27.2, 51, -43.8, 58.2); - p.cubicTo(-43.8, 58.2, -56, 64.2, -61.4, 74.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#4c0000"; - sfp.strokeWidth = 2; - p.moveTo(22.2, 63.4); - p.cubicTo(22.2, 63.4, 6.8, 52.4, 5.8, 51); - p.cubicTo(5.8, 51, -1.2, 40, -14.2, 39.6); - p.cubicTo(-14.2, 39.6, -35.6, 40.4, -52.8, 48.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(20.895, 54.407); - p.cubicTo(22.437, 55.87, 49.4, 84.8, 49.4, 84.8); - p.cubicTo(84.6, 121.401, 56.6, 87.2, 56.6, 87.2); - p.cubicTo(49, 82.4, 39.8, 63.6, 39.8, 63.6); - p.cubicTo(38.6, 60.8, 53.8, 70.8, 53.8, 70.8); - p.cubicTo(57.8, 71.6, 71.4, 90.8, 71.4, 90.8); - p.cubicTo(64.6, 88.4, 69.4, 95.6, 69.4, 95.6); - p.cubicTo(72.2, 97.6, 92.601, 113.201, 92.601, 113.201); - p.cubicTo(96.201, 117.201, 100.201, 118.801, 100.201, 118.801); - p.cubicTo(114.201, 113.601, 107.801, 126.801, 107.801, 126.801); - p.cubicTo(110.201, 133.601, 115.801, 122.001, 115.801, 122.001); - p.cubicTo(127.001, 105.2, 110.601, 107.601, 110.601, 107.601); - p.cubicTo(80.6, 110.401, 73.8, 94.4, 73.8, 94.4); - p.cubicTo(71.4, 92, 80.2, 94.4, 80.2, 94.4); - p.cubicTo(88.601, 96.4, 73, 82, 73, 82); - p.cubicTo(75.4, 82, 84.6, 88.8, 84.6, 88.8); - p.cubicTo(95.001, 98, 97.001, 96, 97.001, 96); - p.cubicTo(115.001, 87.2, 125.401, 94.8, 125.401, 94.8); - p.cubicTo(127.401, 96.4, 121.801, 103.2, 123.401, 108.401); - p.cubicTo(125.001, 113.601, 129.801, 126.001, 129.801, 126.001); - p.cubicTo(127.401, 127.601, 127.801, 138.401, 127.801, 138.401); - p.cubicTo(144.601, 161.601, 135.001, 159.601, 135.001, 159.601); - p.cubicTo(119.401, 159.201, 134.201, 166.801, 134.201, 166.801); - p.cubicTo(137.401, 168.801, 146.201, 176.001, 146.201, 176.001); - p.cubicTo(143.401, 174.801, 141.801, 180.001, 141.801, 180.001); - p.cubicTo(146.601, 184.001, 143.801, 188.801, 143.801, 188.801); - p.cubicTo(137.801, 190.001, 136.601, 194.001, 136.601, 194.001); - p.cubicTo(143.401, 202.001, 133.401, 202.401, 133.401, 202.401); - p.cubicTo(137.001, 206.801, 132.201, 218.801, 132.201, 218.801); - p.cubicTo(127.401, 218.801, 121.001, 224.401, 121.001, 224.401); - p.cubicTo(123.401, 229.201, 113.001, 234.801, 113.001, 234.801); - p.cubicTo(104.601, 236.401, 107.401, 243.201, 107.401, 243.201); - p.cubicTo(99.401, 249.201, 97.001, 265.201, 97.001, 265.201); - p.cubicTo(96.201, 275.601, 93.801, 278.801, 99.001, 276.801); - p.cubicTo(104.201, 274.801, 103.401, 262.401, 103.401, 262.401); - p.cubicTo(98.601, 246.801, 141.401, 230.801, 141.401, 230.801); - p.cubicTo(145.401, 229.201, 146.201, 224.001, 146.201, 224.001); - p.cubicTo(148.201, 224.401, 157.001, 232.001, 157.001, 232.001); - p.cubicTo(164.601, 243.201, 165.001, 234.001, 165.001, 234.001); - p.cubicTo(166.201, 230.401, 164.601, 224.401, 164.601, 224.401); - p.cubicTo(170.601, 202.801, 156.601, 196.401, 156.601, 196.401); - p.cubicTo(146.601, 162.801, 160.601, 171.201, 160.601, 171.201); - p.cubicTo(163.401, 176.801, 174.201, 182.001, 174.201, 182.001); - p.lineTo(177.801, 179.601); - p.cubicTo(176.201, 174.801, 184.601, 168.801, 184.601, 168.801); - p.cubicTo(187.401, 175.201, 193.401, 167.201, 193.401, 167.201); - p.cubicTo(197.001, 142.801, 209.401, 157.201, 209.401, 157.201); - p.cubicTo(213.401, 158.401, 214.601, 151.601, 214.601, 151.601); - p.cubicTo(218.201, 141.201, 214.601, 127.601, 214.601, 127.601); - p.cubicTo(218.201, 127.201, 227.801, 133.201, 227.801, 133.201); - p.cubicTo(230.601, 129.601, 221.401, 112.801, 225.401, 115.201); - p.cubicTo(229.401, 117.601, 233.801, 119.201, 233.801, 119.201); - p.cubicTo(234.601, 117.201, 224.601, 104.801, 224.601, 104.801); - p.cubicTo(220.201, 102, 215.001, 81.6, 215.001, 81.6); - p.cubicTo(222.201, 85.2, 212.201, 70, 212.201, 70); - p.cubicTo(212.201, 66.8, 218.201, 55.6, 218.201, 55.6); - p.cubicTo(217.401, 48.8, 218.201, 49.2, 218.201, 49.2); - p.cubicTo(221.001, 50.4, 229.001, 52, 222.201, 45.6); - p.cubicTo(215.401, 39.2, 223.001, 34.4, 223.001, 34.4); - p.cubicTo(227.401, 31.6, 213.801, 32, 213.801, 32); - p.cubicTo(208.601, 27.6, 209.001, 23.6, 209.001, 23.6); - p.cubicTo(217.001, 25.6, 202.601, 11.2, 200.201, 7.6); - p.cubicTo(197.801, 4, 207.401, -1.2, 207.401, -1.2); - p.cubicTo(220.601, -4.8, 209.001, -8, 209.001, -8); - p.cubicTo(189.401, -7.6, 200.201, -18.4, 200.201, -18.4); - p.cubicTo(206.201, -18, 204.601, -20.4, 204.601, -20.4); - p.cubicTo(199.401, -21.6, 189.801, -28, 189.801, -28); - p.cubicTo(185.801, -31.6, 189.401, -30.8, 189.401, -30.8); - p.cubicTo(206.201, -29.6, 177.401, -40.8, 177.401, -40.8); - p.cubicTo(185.401, -40.8, 167.401, -51.2, 167.401, -51.2); - p.cubicTo(165.401, -52.8, 162.201, -60.4, 162.201, -60.4); - p.cubicTo(156.201, -65.6, 151.401, -72.4, 151.401, -72.4); - p.cubicTo(151.001, -76.8, 146.201, -81.6, 146.201, -81.6); - p.cubicTo(134.601, -95.2, 129.001, -94.8, 129.001, -94.8); - p.cubicTo(114.201, -98.4, 109.001, -97.6, 109.001, -97.6); - p.lineTo(56.2, -93.2); - p.cubicTo(29.8, -80.4, 37.6, -59.4, 37.6, -59.4); - p.cubicTo(44, -51, 53.2, -54.8, 53.2, -54.8); - p.cubicTo(57.8, -61, 69.4, -58.8, 69.4, -58.8); - p.cubicTo(89.801, -55.6, 87.201, -59.2, 87.201, -59.2); - p.cubicTo(84.801, -63.8, 68.6, -70, 68.4, -70.6); - p.cubicTo(68.2, -71.2, 59.4, -74.6, 59.4, -74.6); - p.cubicTo(56.4, -75.8, 52, -85, 52, -85); - p.cubicTo(48.8, -88.4, 64.6, -82.6, 64.6, -82.6); - p.cubicTo(63.4, -81.6, 70.8, -77.6, 70.8, -77.6); - p.cubicTo(88.201, -78.6, 98.801, -67.8, 98.801, -67.8); - p.cubicTo(109.601, -51.2, 109.801, -59.4, 109.801, -59.4); - p.cubicTo(112.601, -68.8, 100.801, -90, 100.801, -90); - p.cubicTo(101.201, -92, 109.401, -85.4, 109.401, -85.4); - p.cubicTo(110.801, -87.4, 111.601, -81.6, 111.601, -81.6); - p.cubicTo(111.801, -79.2, 115.601, -71.2, 115.601, -71.2); - p.cubicTo(118.401, -58.2, 122.001, -65.6, 122.001, -65.6); - p.lineTo(126.601, -56.2); - p.cubicTo(128.001, -53.6, 122.001, -46, 122.001, -46); - p.cubicTo(121.801, -43.2, 122.601, -43.4, 117.001, -35.8); - p.cubicTo(111.401, -28.2, 114.801, -23.8, 114.801, -23.8); - p.cubicTo(113.401, -17.2, 122.201, -17.6, 122.201, -17.6); - p.cubicTo(124.801, -15.4, 128.201, -15.4, 128.201, -15.4); - p.cubicTo(130.001, -13.4, 132.401, -14, 132.401, -14); - p.cubicTo(134.001, -17.8, 140.201, -15.8, 140.201, -15.8); - p.cubicTo(141.601, -18.2, 149.801, -18.6, 149.801, -18.6); - p.cubicTo(150.801, -21.2, 151.201, -22.8, 154.601, -23.4); - p.cubicTo(158.001, -24, 133.401, -67, 133.401, -67); - p.cubicTo(139.801, -67.8, 131.601, -80.2, 131.601, -80.2); - p.cubicTo(129.401, -86.8, 140.801, -72.2, 143.001, -70.8); - p.cubicTo(145.201, -69.4, 146.201, -67.2, 144.601, -67.4); - p.cubicTo(143.001, -67.6, 141.201, -65.4, 142.601, -65.2); - p.cubicTo(144.001, -65, 157.001, -50, 160.401, -39.8); - p.cubicTo(163.801, -29.6, 169.801, -25.6, 176.001, -19.6); - p.cubicTo(182.201, -13.6, 181.401, 10.6, 181.401, 10.6); - p.cubicTo(181.001, 19.4, 187.001, 30, 187.001, 30); - p.cubicTo(189.001, 33.8, 184.801, 52, 184.801, 52); - p.cubicTo(182.801, 54.2, 184.201, 55, 184.201, 55); - p.cubicTo(185.201, 56.2, 192.001, 69.4, 192.001, 69.4); - p.cubicTo(190.201, 69.2, 193.801, 72.8, 193.801, 72.8); - p.cubicTo(199.001, 78.8, 192.601, 75.8, 192.601, 75.8); - p.cubicTo(186.601, 74.2, 193.601, 84, 193.601, 84); - p.cubicTo(194.801, 85.8, 185.801, 81.2, 185.801, 81.2); - p.cubicTo(176.601, 80.6, 188.201, 87.8, 188.201, 87.8); - p.cubicTo(196.801, 95, 185.401, 90.6, 185.401, 90.6); - p.cubicTo(180.801, 88.8, 184.001, 95.6, 184.001, 95.6); - p.cubicTo(187.201, 97.2, 204.401, 104.2, 204.401, 104.2); - p.cubicTo(204.801, 108.001, 201.801, 113.001, 201.801, 113.001); - p.cubicTo(202.201, 117.001, 200.001, 120.401, 200.001, 120.401); - p.cubicTo(198.801, 128.601, 198.201, 129.401, 198.201, 129.401); - p.cubicTo(194.001, 129.601, 186.601, 143.401, 186.601, 143.401); - p.cubicTo(184.801, 146.001, 174.601, 158.001, 174.601, 158.001); - p.cubicTo(172.601, 165.001, 154.601, 157.801, 154.601, 157.801); - p.cubicTo(148.001, 161.201, 150.001, 157.801, 150.001, 157.801); - p.cubicTo(149.601, 155.601, 154.401, 149.601, 154.401, 149.601); - p.cubicTo(161.401, 147.001, 158.801, 136.201, 158.801, 136.201); - p.cubicTo(162.801, 134.801, 151.601, 132.001, 151.801, 130.801); - p.cubicTo(152.001, 129.601, 157.801, 128.201, 157.801, 128.201); - p.cubicTo(165.801, 126.201, 161.401, 123.801, 161.401, 123.801); - p.cubicTo(160.801, 119.801, 163.801, 114.201, 163.801, 114.201); - p.cubicTo(175.401, 113.401, 163.801, 97.2, 163.801, 97.2); - p.cubicTo(153.001, 89.6, 152.001, 83.8, 152.001, 83.8); - p.cubicTo(164.601, 75.6, 156.401, 63.2, 156.601, 59.6); - p.cubicTo(156.801, 56, 158.001, 34.4, 158.001, 34.4); - p.cubicTo(156.001, 28.2, 153.001, 14.6, 153.001, 14.6); - p.cubicTo(155.201, 9.4, 162.601, -3.2, 162.601, -3.2); - p.cubicTo(165.401, -7.4, 174.201, -12.2, 172.001, -15.2); - p.cubicTo(169.801, -18.2, 162.001, -16.4, 162.001, -16.4); - p.cubicTo(154.201, -17.8, 154.801, -12.6, 154.801, -12.6); - p.cubicTo(153.201, -11.6, 152.401, -6.6, 152.401, -6.6); - p.cubicTo(151.68, 1.333, 142.801, 7.6, 142.801, 7.6); - p.cubicTo(131.601, 13.8, 140.801, 17.8, 140.801, 17.8); - p.cubicTo(146.801, 24.4, 137.001, 24.6, 137.001, 24.6); - p.cubicTo(126.001, 22.8, 134.201, 33, 134.201, 33); - p.cubicTo(145.001, 45.8, 142.001, 48.6, 142.001, 48.6); - p.cubicTo(131.801, 49.6, 144.401, 58.8, 144.401, 58.8); - p.cubicTo(144.401, 58.8, 143.601, 56.8, 143.801, 58.6); - p.cubicTo(144.001, 60.4, 147.001, 64.6, 147.801, 66.6); - p.cubicTo(148.601, 68.6, 144.601, 68.8, 144.601, 68.8); - p.cubicTo(145.201, 78.4, 129.801, 74.2, 129.801, 74.2); - p.cubicTo(129.801, 74.2, 129.801, 74.2, 128.201, 74.4); - p.cubicTo(126.601, 74.6, 115.401, 73.8, 109.601, 71.6); - p.cubicTo(103.801, 69.4, 97.001, 69.4, 97.001, 69.4); - p.cubicTo(97.001, 69.4, 93.001, 71.2, 85.4, 71); - p.cubicTo(77.8, 70.8, 69.8, 73.6, 69.8, 73.6); - p.cubicTo(65.4, 73.2, 74, 68.8, 74.2, 69); - p.cubicTo(74.4, 69.2, 80, 63.6, 72, 64.2); - p.cubicTo(50.203, 65.835, 39.4, 55.6, 39.4, 55.6); - p.cubicTo(37.4, 54.2, 34.8, 51.4, 34.8, 51.4); - p.cubicTo(24.8, 49.4, 36.2, 63.8, 36.2, 63.8); - p.cubicTo(37.4, 65.2, 36, 66.2, 36, 66.2); - p.cubicTo(35.2, 64.6, 27.4, 59.2, 27.4, 59.2); - p.cubicTo(24.589, 58.227, 23.226, 56.893, 20.895, 54.407); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#4c0000"; - sfp.strokeWidth = -1; - p.moveTo(-3, 42.8); - p.cubicTo(-3, 42.8, 8.6, 48.4, 11.2, 51.2); - p.cubicTo(13.8, 54, 27.8, 65.4, 27.8, 65.4); - p.cubicTo(27.8, 65.4, 22.4, 63.4, 19.8, 61.6); - p.cubicTo(17.2, 59.8, 6.4, 51.6, 6.4, 51.6); - p.cubicTo(6.4, 51.6, 2.6, 45.6, -3, 42.8); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#99cc32"; - sfp.strokeWidth = -1; - p.moveTo(-61.009, 11.603); - p.cubicTo(-60.672, 11.455, -61.196, 8.743, -61.4, 8.2); - p.cubicTo(-62.422, 5.474, -71.4, 4, -71.4, 4); - p.cubicTo(-71.627, 5.365, -71.682, 6.961, -71.576, 8.599); - p.cubicTo(-71.576, 8.599, -66.708, 14.118, -61.009, 11.603); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#659900"; - sfp.strokeWidth = -1; - p.moveTo(-61.009, 11.403); - p.cubicTo(-61.458, 11.561, -61.024, 8.669, -61.2, 8.2); - p.cubicTo(-62.222, 5.474, -71.4, 3.9, -71.4, 3.9); - p.cubicTo(-71.627, 5.265, -71.682, 6.861, -71.576, 8.499); - p.cubicTo(-71.576, 8.499, -67.308, 13.618, -61.009, 11.403); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-65.4, 11.546); - p.cubicTo(-66.025, 11.546, -66.531, 10.406, -66.531, 9); - p.cubicTo(-66.531, 7.595, -66.025, 6.455, -65.4, 6.455); - p.cubicTo(-64.775, 6.455, -64.268, 7.595, -64.268, 9); - p.cubicTo(-64.268, 10.406, -64.775, 11.546, -65.4, 11.546); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-65.4, 9); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-111, 109.601); - p.cubicTo(-111, 109.601, -116.6, 119.601, -91.8, 113.601); - p.cubicTo(-91.8, 113.601, -77.8, 112.401, -75.4, 110.001); - p.cubicTo(-74.2, 110.801, -65.834, 113.734, -63, 114.401); - p.cubicTo(-56.2, 116.001, -47.8, 106, -47.8, 106); - p.cubicTo(-47.8, 106, -43.2, 95.5, -40.4, 95.5); - p.cubicTo(-37.6, 95.5, -40.8, 97.1, -40.8, 97.1); - p.cubicTo(-40.8, 97.1, -47.4, 107.201, -47, 108.801); - p.cubicTo(-47, 108.801, -52.2, 128.801, -68.2, 129.601); - p.cubicTo(-68.2, 129.601, -84.35, 130.551, -83, 136.401); - p.cubicTo(-83, 136.401, -74.2, 134.001, -71.8, 136.401); - p.cubicTo(-71.8, 136.401, -61, 136.001, -69, 142.401); - p.lineTo(-75.8, 154.001); - p.cubicTo(-75.8, 154.001, -75.66, 157.919, -85.8, 154.401); - p.cubicTo(-95.6, 151.001, -105.9, 138.101, -105.9, 138.101); - p.cubicTo(-105.9, 138.101, -121.85, 123.551, -111, 109.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#e59999"; - sfp.strokeWidth = -1; - p.moveTo(-112.2, 113.601); - p.cubicTo(-112.2, 113.601, -114.2, 123.201, -77.4, 112.801); - p.cubicTo(-77.4, 112.801, -73, 112.801, -70.6, 113.601); - p.cubicTo(-68.2, 114.401, -56.2, 117.201, -54.2, 116.001); - p.cubicTo(-54.2, 116.001, -61.4, 129.601, -73, 128.001); - p.cubicTo(-73, 128.001, -86.2, 129.601, -85.8, 134.401); - p.cubicTo(-85.8, 134.401, -81.8, 141.601, -77, 144.001); - p.cubicTo(-77, 144.001, -74.2, 146.401, -74.6, 149.601); - p.cubicTo(-75, 152.801, -77.8, 154.401, -79.8, 155.201); - p.cubicTo(-81.8, 156.001, -85, 152.801, -86.6, 152.801); - p.cubicTo(-88.2, 152.801, -96.6, 146.401, -101, 141.601); - p.cubicTo(-105.4, 136.801, -113.8, 124.801, -113.4, 122.001); - p.cubicTo(-113, 119.201, -112.2, 113.601, -112.2, 113.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#b26565"; - sfp.strokeWidth = -1; - p.moveTo(-109, 131.051); - p.cubicTo(-106.4, 135.001, -103.2, 139.201, -101, 141.601); - p.cubicTo(-96.6, 146.401, -88.2, 152.801, -86.6, 152.801); - p.cubicTo(-85, 152.801, -81.8, 156.001, -79.8, 155.201); - p.cubicTo(-77.8, 154.401, -75, 152.801, -74.6, 149.601); - p.cubicTo(-74.2, 146.401, -77, 144.001, -77, 144.001); - p.cubicTo(-80.066, 142.468, -82.806, 138.976, -84.385, 136.653); - p.cubicTo(-84.385, 136.653, -84.2, 139.201, -89.4, 138.401); - p.cubicTo(-94.6, 137.601, -99.8, 134.801, -101.4, 131.601); - p.cubicTo(-103, 128.401, -105.4, 126.001, -103.8, 129.601); - p.cubicTo(-102.2, 133.201, -99.8, 136.801, -98.2, 137.201); - p.cubicTo(-96.6, 137.601, -97, 138.801, -99.4, 138.401); - p.cubicTo(-101.8, 138.001, -104.6, 137.601, -109, 132.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#992600"; - sfp.strokeWidth = -1; - p.moveTo(-111.6, 110.001); - p.cubicTo(-111.6, 110.001, -109.8, 96.4, -108.6, 92.4); - p.cubicTo(-108.6, 92.4, -109.4, 85.6, -107, 81.4); - p.cubicTo(-104.6, 77.2, -102.6, 71, -99.6, 65.6); - p.cubicTo(-96.6, 60.2, -96.4, 56.2, -92.4, 54.6); - p.cubicTo(-88.4, 53, -82.4, 44.4, -79.6, 43.4); - p.cubicTo(-76.8, 42.4, -77, 43.2, -77, 43.2); - p.cubicTo(-77, 43.2, -70.2, 28.4, -56.6, 32.4); - p.cubicTo(-56.6, 32.4, -72.8, 29.6, -57, 20.2); - p.cubicTo(-57, 20.2, -61.8, 21.3, -58.5, 14.3); - p.cubicTo(-56.299, 9.632, -56.8, 16.4, -67.8, 28.2); - p.cubicTo(-67.8, 28.2, -72.8, 36.8, -78, 39.8); - p.cubicTo(-83.2, 42.8, -95.2, 49.8, -96.4, 53.6); - p.cubicTo(-97.6, 57.4, -100.8, 63.2, -102.8, 64.8); - p.cubicTo(-104.8, 66.4, -107.6, 70.6, -108, 74); - p.cubicTo(-108, 74, -109.2, 78, -110.6, 79.2); - p.cubicTo(-112, 80.4, -112.2, 83.6, -112.2, 85.6); - p.cubicTo(-112.2, 87.6, -114.2, 90.4, -114, 92.8); - p.cubicTo(-114, 92.8, -113.2, 111.801, -113.6, 113.801); - p.lineTo(-111.6, 110.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(-120.2, 114.601); - p.cubicTo(-120.2, 114.601, -122.2, 113.201, -126.6, 119.201); - p.cubicTo(-126.6, 119.201, -119.3, 152.201, -119.3, 153.601); - p.cubicTo(-119.3, 153.601, -118.2, 151.501, -119.5, 144.301); - p.cubicTo(-120.8, 137.101, -121.7, 124.401, -121.7, 124.401); - p.lineTo(-120.2, 114.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#992600"; - sfp.strokeWidth = -1; - p.moveTo(-98.6, 54); - p.cubicTo(-98.6, 54, -116.2, 57.2, -115.8, 86.4); - p.lineTo(-116.6, 111.201); - p.cubicTo(-116.6, 111.201, -117.8, 85.6, -119, 84); - p.cubicTo(-120.2, 82.4, -116.2, 71.2, -119.4, 77.2); - p.cubicTo(-119.4, 77.2, -133.4, 91.2, -125.4, 112.401); - p.cubicTo(-125.4, 112.401, -123.9, 115.701, -126.9, 111.101); - p.cubicTo(-126.9, 111.101, -131.5, 98.5, -130.4, 92.1); - p.cubicTo(-130.4, 92.1, -130.2, 89.9, -128.3, 87.1); - p.cubicTo(-128.3, 87.1, -119.7, 75.4, -117, 73.1); - p.cubicTo(-117, 73.1, -115.2, 58.7, -99.8, 53.5); - p.cubicTo(-99.8, 53.5, -94.1, 51.2, -98.6, 54); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(40.8, -12.2); - p.cubicTo(41.46, -12.554, 41.451, -13.524, 42.031, -13.697); - p.cubicTo(43.18, -14.041, 43.344, -15.108, 43.862, -15.892); - p.cubicTo(44.735, -17.211, 44.928, -18.744, 45.51, -20.235); - p.cubicTo(45.782, -20.935, 45.809, -21.89, 45.496, -22.55); - p.cubicTo(44.322, -25.031, 43.62, -27.48, 42.178, -29.906); - p.cubicTo(41.91, -30.356, 41.648, -31.15, 41.447, -31.748); - p.cubicTo(40.984, -33.132, 39.727, -34.123, 38.867, -35.443); - p.cubicTo(38.579, -35.884, 39.104, -36.809, 38.388, -36.893); - p.cubicTo(37.491, -36.998, 36.042, -37.578, 35.809, -36.552); - p.cubicTo(35.221, -33.965, 36.232, -31.442, 37.2, -29); - p.cubicTo(36.418, -28.308, 36.752, -27.387, 36.904, -26.62); - p.cubicTo(37.614, -23.014, 36.416, -19.662, 35.655, -16.188); - p.cubicTo(35.632, -16.084, 35.974, -15.886, 35.946, -15.824); - p.cubicTo(34.724, -13.138, 33.272, -10.693, 31.453, -8.312); - p.cubicTo(30.695, -7.32, 29.823, -6.404, 29.326, -5.341); - p.cubicTo(28.958, -4.554, 28.55, -3.588, 28.8, -2.6); - p.cubicTo(25.365, 0.18, 23.115, 4.025, 20.504, 7.871); - p.cubicTo(20.042, 8.551, 20.333, 9.76, 20.884, 10.029); - p.cubicTo(21.697, 10.427, 22.653, 9.403, 23.123, 8.557); - p.cubicTo(23.512, 7.859, 23.865, 7.209, 24.356, 6.566); - p.cubicTo(24.489, 6.391, 24.31, 5.972, 24.445, 5.851); - p.cubicTo(27.078, 3.504, 28.747, 0.568, 31.2, -1.8); - p.cubicTo(33.15, -2.129, 34.687, -3.127, 36.435, -4.14); - p.cubicTo(36.743, -4.319, 37.267, -4.07, 37.557, -4.265); - p.cubicTo(39.31, -5.442, 39.308, -7.478, 39.414, -9.388); - p.cubicTo(39.464, -10.272, 39.66, -11.589, 40.8, -12.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(31.959, -16.666); - p.cubicTo(32.083, -16.743, 31.928, -17.166, 32.037, -17.382); - p.cubicTo(32.199, -17.706, 32.602, -17.894, 32.764, -18.218); - p.cubicTo(32.873, -18.434, 32.71, -18.814, 32.846, -18.956); - p.cubicTo(35.179, -21.403, 35.436, -24.427, 34.4, -27.4); - p.cubicTo(35.424, -28.02, 35.485, -29.282, 35.06, -30.129); - p.cubicTo(34.207, -31.829, 34.014, -33.755, 33.039, -35.298); - p.cubicTo(32.237, -36.567, 30.659, -37.811, 29.288, -36.508); - p.cubicTo(28.867, -36.108, 28.546, -35.321, 28.824, -34.609); - p.cubicTo(28.888, -34.446, 29.173, -34.3, 29.146, -34.218); - p.cubicTo(29.039, -33.894, 28.493, -33.67, 28.487, -33.398); - p.cubicTo(28.457, -31.902, 27.503, -30.391, 28.133, -29.062); - p.cubicTo(28.905, -27.433, 29.724, -25.576, 30.4, -23.8); - p.cubicTo(29.166, -21.684, 30.199, -19.235, 28.446, -17.358); - p.cubicTo(28.31, -17.212, 28.319, -16.826, 28.441, -16.624); - p.cubicTo(28.733, -16.138, 29.139, -15.732, 29.625, -15.44); - p.cubicTo(29.827, -15.319, 30.175, -15.317, 30.375, -15.441); - p.cubicTo(30.953, -15.803, 31.351, -16.29, 31.959, -16.666); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(94.771, -26.977); - p.cubicTo(96.16, -25.185, 96.45, -22.39, 94.401, -21); - p.cubicTo(94.951, -17.691, 98.302, -19.67, 100.401, -20.2); - p.cubicTo(100.292, -20.588, 100.519, -20.932, 100.802, -20.937); - p.cubicTo(101.859, -20.952, 102.539, -21.984, 103.601, -21.8); - p.cubicTo(104.035, -23.357, 105.673, -24.059, 106.317, -25.439); - p.cubicTo(108.043, -29.134, 107.452, -33.407, 104.868, -36.653); - p.cubicTo(104.666, -36.907, 104.883, -37.424, 104.759, -37.786); - p.cubicTo(104.003, -39.997, 101.935, -40.312, 100.001, -41); - p.cubicTo(98.824, -44.875, 98.163, -48.906, 96.401, -52.6); - p.cubicTo(94.787, -52.85, 94.089, -54.589, 92.752, -55.309); - p.cubicTo(91.419, -56.028, 90.851, -54.449, 90.892, -53.403); - p.cubicTo(90.899, -53.198, 91.351, -52.974, 91.181, -52.609); - p.cubicTo(91.105, -52.445, 90.845, -52.334, 90.845, -52.2); - p.cubicTo(90.846, -52.065, 91.067, -51.934, 91.201, -51.8); - p.cubicTo(90.283, -50.98, 88.86, -50.503, 88.565, -49.358); - p.cubicTo(87.611, -45.648, 90.184, -42.523, 91.852, -39.322); - p.cubicTo(92.443, -38.187, 91.707, -36.916, 90.947, -35.708); - p.cubicTo(90.509, -35.013, 90.617, -33.886, 90.893, -33.03); - p.cubicTo(91.645, -30.699, 93.236, -28.96, 94.771, -26.977); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(57.611, -8.591); - p.cubicTo(56.124, -6.74, 52.712, -4.171, 55.629, -2.243); - p.cubicTo(55.823, -2.114, 56.193, -2.11, 56.366, -2.244); - p.cubicTo(58.387, -3.809, 60.39, -4.712, 62.826, -5.294); - p.cubicTo(62.95, -5.323, 63.224, -4.856, 63.593, -5.017); - p.cubicTo(65.206, -5.72, 67.216, -5.662, 68.4, -7); - p.cubicTo(72.167, -6.776, 75.732, -7.892, 79.123, -9.2); - p.cubicTo(80.284, -9.648, 81.554, -10.207, 82.755, -10.709); - p.cubicTo(84.131, -11.285, 85.335, -12.213, 86.447, -13.354); - p.cubicTo(86.58, -13.49, 86.934, -13.4, 87.201, -13.4); - p.cubicTo(87.161, -14.263, 88.123, -14.39, 88.37, -15.012); - p.cubicTo(88.462, -15.244, 88.312, -15.64, 88.445, -15.742); - p.cubicTo(90.583, -17.372, 91.503, -19.39, 90.334, -21.767); - p.cubicTo(90.049, -22.345, 89.8, -22.963, 89.234, -23.439); - p.cubicTo(88.149, -24.35, 87.047, -23.496, 86, -23.8); - p.cubicTo(85.841, -23.172, 85.112, -23.344, 84.726, -23.146); - p.cubicTo(83.867, -22.707, 82.534, -23.292, 81.675, -22.854); - p.cubicTo(80.313, -22.159, 79.072, -21.99, 77.65, -21.613); - p.cubicTo(77.338, -21.531, 76.56, -21.627, 76.4, -21); - p.cubicTo(76.266, -21.134, 76.118, -21.368, 76.012, -21.346); - p.cubicTo(74.104, -20.95, 72.844, -20.736, 71.543, -19.044); - p.cubicTo(71.44, -18.911, 70.998, -19.09, 70.839, -18.955); - p.cubicTo(69.882, -18.147, 69.477, -16.913, 68.376, -16.241); - p.cubicTo(68.175, -16.118, 67.823, -16.286, 67.629, -16.157); - p.cubicTo(66.983, -15.726, 66.616, -15.085, 65.974, -14.638); - p.cubicTo(65.645, -14.409, 65.245, -14.734, 65.277, -14.99); - p.cubicTo(65.522, -16.937, 66.175, -18.724, 65.6, -20.6); - p.cubicTo(67.677, -23.12, 70.194, -25.069, 72, -27.8); - p.cubicTo(72.015, -29.966, 72.707, -32.112, 72.594, -34.189); - p.cubicTo(72.584, -34.382, 72.296, -35.115, 72.17, -35.462); - p.cubicTo(71.858, -36.316, 72.764, -37.382, 71.92, -38.106); - p.cubicTo(70.516, -39.309, 69.224, -38.433, 68.4, -37); - p.cubicTo(66.562, -36.61, 64.496, -35.917, 62.918, -37.151); - p.cubicTo(61.911, -37.938, 61.333, -38.844, 60.534, -39.9); - p.cubicTo(59.549, -41.202, 59.884, -42.638, 59.954, -44.202); - p.cubicTo(59.96, -44.33, 59.645, -44.466, 59.645, -44.6); - p.cubicTo(59.646, -44.735, 59.866, -44.866, 60, -45); - p.cubicTo(59.294, -45.626, 59.019, -46.684, 58, -47); - p.cubicTo(58.305, -48.092, 57.629, -48.976, 56.758, -49.278); - p.cubicTo(54.763, -49.969, 53.086, -48.057, 51.194, -47.984); - p.cubicTo(50.68, -47.965, 50.213, -49.003, 49.564, -49.328); - p.cubicTo(49.132, -49.544, 48.428, -49.577, 48.066, -49.311); - p.cubicTo(47.378, -48.807, 46.789, -48.693, 46.031, -48.488); - p.cubicTo(44.414, -48.052, 43.136, -46.958, 41.656, -46.103); - p.cubicTo(40.171, -45.246, 39.216, -43.809, 38.136, -42.489); - p.cubicTo(37.195, -41.337, 37.059, -38.923, 38.479, -38.423); - p.cubicTo(40.322, -37.773, 41.626, -40.476, 43.592, -40.15); - p.cubicTo(43.904, -40.099, 44.11, -39.788, 44, -39.4); - p.cubicTo(44.389, -39.291, 44.607, -39.52, 44.8, -39.8); - p.cubicTo(45.658, -38.781, 46.822, -38.444, 47.76, -37.571); - p.cubicTo(48.73, -36.667, 50.476, -37.085, 51.491, -36.088); - p.cubicTo(53.02, -34.586, 52.461, -31.905, 54.4, -30.6); - p.cubicTo(53.814, -29.287, 53.207, -28.01, 52.872, -26.583); - p.cubicTo(52.59, -25.377, 53.584, -24.18, 54.795, -24.271); - p.cubicTo(56.053, -24.365, 56.315, -25.124, 56.8, -26.2); - p.cubicTo(57.067, -25.933, 57.536, -25.636, 57.495, -25.42); - p.cubicTo(57.038, -23.033, 56.011, -21.04, 55.553, -18.609); - p.cubicTo(55.494, -18.292, 55.189, -18.09, 54.8, -18.2); - p.cubicTo(54.332, -14.051, 50.28, -11.657, 47.735, -8.492); - p.cubicTo(47.332, -7.99, 47.328, -6.741, 47.737, -6.338); - p.cubicTo(49.14, -4.951, 51.1, -6.497, 52.8, -7); - p.cubicTo(53.013, -8.206, 53.872, -9.148, 55.204, -9.092); - p.cubicTo(55.46, -9.082, 55.695, -9.624, 56.019, -9.754); - p.cubicTo(56.367, -9.892, 56.869, -9.668, 57.155, -9.866); - p.cubicTo(58.884, -11.061, 60.292, -12.167, 62.03, -13.356); - p.cubicTo(62.222, -13.487, 62.566, -13.328, 62.782, -13.436); - p.cubicTo(63.107, -13.598, 63.294, -13.985, 63.617, -14.17); - p.cubicTo(63.965, -14.37, 64.207, -14.08, 64.4, -13.8); - p.cubicTo(63.754, -13.451, 63.75, -12.494, 63.168, -12.292); - p.cubicTo(62.393, -12.024, 61.832, -11.511, 61.158, -11.064); - p.cubicTo(60.866, -10.871, 60.207, -11.119, 60.103, -10.94); - p.cubicTo(59.505, -9.912, 58.321, -9.474, 57.611, -8.591); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(2.2, -58); - p.cubicTo(2.2, -58, -7.038, -60.872, -18.2, -35.2); - p.cubicTo(-18.2, -35.2, -20.6, -30, -23, -28); - p.cubicTo(-25.4, -26, -36.6, -22.4, -38.6, -18.4); - p.lineTo(-49, -2.4); - p.cubicTo(-49, -2.4, -34.2, -18.4, -31, -20.8); - p.cubicTo(-31, -20.8, -23, -29.2, -26.2, -22.4); - p.cubicTo(-26.2, -22.4, -40.2, -11.6, -39, -2.4); - p.cubicTo(-39, -2.4, -44.6, 12, -45.4, 14); - p.cubicTo(-45.4, 14, -29.4, -18, -27, -19.2); - p.cubicTo(-24.6, -20.4, -23.4, -20.4, -24.6, -16.8); - p.cubicTo(-25.8, -13.2, -26.2, 3.2, -29, 5.2); - p.cubicTo(-29, 5.2, -21, -15.2, -21.8, -18.4); - p.cubicTo(-21.8, -18.4, -18.6, -22, -16.2, -16.8); - p.lineTo(-17.4, -0.8); - p.lineTo(-13, 11.2); - p.cubicTo(-13, 11.2, -15.4, 0, -13.8, -15.6); - p.cubicTo(-13.8, -15.6, -15.8, -26, -11.8, -20.4); - p.cubicTo(-7.8, -14.8, 1.8, -8.8, 1.8, -4); - p.cubicTo(1.8, -4, -3.4, -21.6, -12.6, -26.4); - p.lineTo(-16.6, -20.4); - p.lineTo(-17.8, -22.4); - p.cubicTo(-17.8, -22.4, -21.4, -23.2, -17, -30); - p.cubicTo(-12.6, -36.8, -13, -37.6, -13, -37.6); - p.cubicTo(-13, -37.6, -6.6, -30.4, -5, -30.4); - p.cubicTo(-5, -30.4, 8.2, -38, 9.4, -13.6); - p.cubicTo(9.4, -13.6, 16.2, -28, 7, -34.8); - p.cubicTo(7, -34.8, -7.8, -36.8, -6.6, -42); - p.lineTo(0.6, -54.4); - p.cubicTo(4.2, -59.6, 2.6, -56.8, 2.6, -56.8); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-17.8, -41.6); - p.cubicTo(-17.8, -41.6, -30.6, -41.6, -33.8, -36.4); - p.lineTo(-41, -26.8); - p.cubicTo(-41, -26.8, -23.8, -36.8, -19.8, -38); - p.cubicTo(-15.8, -39.2, -17.8, -41.6, -17.8, -41.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-57.8, -35.2); - p.cubicTo(-57.8, -35.2, -59.8, -34, -60.2, -31.2); - p.cubicTo(-60.6, -28.4, -63, -28, -62.2, -25.2); - p.cubicTo(-61.4, -22.4, -59.4, -20, -59.4, -24); - p.cubicTo(-59.4, -28, -57.8, -30, -57, -31.2); - p.cubicTo(-56.2, -32.4, -54.6, -36.8, -57.8, -35.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-66.6, 26); - p.cubicTo(-66.6, 26, -75, 22, -78.2, 18.4); - p.cubicTo(-81.4, 14.8, -80.948, 19.966, -85.8, 19.6); - p.cubicTo(-91.647, 19.159, -90.6, 3.2, -90.6, 3.2); - p.lineTo(-94.6, 10.8); - p.cubicTo(-94.6, 10.8, -95.8, 25.2, -87.8, 22.8); - p.cubicTo(-83.893, 21.628, -82.6, 23.2, -84.2, 24); - p.cubicTo(-85.8, 24.8, -78.6, 25.2, -81.4, 26.8); - p.cubicTo(-84.2, 28.4, -69.8, 23.2, -72.2, 33.6); - p.lineTo(-66.6, 26); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-79.2, 40.4); - p.cubicTo(-79.2, 40.4, -94.6, 44.8, -98.2, 35.2); - p.cubicTo(-98.2, 35.2, -103, 37.6, -100.8, 40.6); - p.cubicTo(-98.6, 43.6, -97.4, 44, -97.4, 44); - p.cubicTo(-97.4, 44, -92, 45.2, -92.6, 46); - p.cubicTo(-93.2, 46.8, -95.6, 50.2, -95.6, 50.2); - p.cubicTo(-95.6, 50.2, -85.4, 44.2, -79.2, 40.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(149.201, 118.601); - p.cubicTo(148.774, 120.735, 147.103, 121.536, 145.201, 122.201); - p.cubicTo(143.284, 121.243, 140.686, 118.137, 138.801, 120.201); - p.cubicTo(138.327, 119.721, 137.548, 119.661, 137.204, 118.999); - p.cubicTo(136.739, 118.101, 137.011, 117.055, 136.669, 116.257); - p.cubicTo(136.124, 114.985, 135.415, 113.619, 135.601, 112.201); - p.cubicTo(137.407, 111.489, 138.002, 109.583, 137.528, 107.82); - p.cubicTo(137.459, 107.563, 137.03, 107.366, 137.23, 107.017); - p.cubicTo(137.416, 106.694, 137.734, 106.467, 138.001, 106.2); - p.cubicTo(137.866, 106.335, 137.721, 106.568, 137.61, 106.548); - p.cubicTo(137, 106.442, 137.124, 105.805, 137.254, 105.418); - p.cubicTo(137.839, 103.672, 139.853, 103.408, 141.201, 104.6); - p.cubicTo(141.457, 104.035, 141.966, 104.229, 142.401, 104.2); - p.cubicTo(142.351, 103.621, 142.759, 103.094, 142.957, 102.674); - p.cubicTo(143.475, 101.576, 145.104, 102.682, 145.901, 102.07); - p.cubicTo(146.977, 101.245, 148.04, 100.546, 149.118, 101.149); - p.cubicTo(150.927, 102.162, 152.636, 103.374, 153.835, 105.115); - p.cubicTo(154.41, 105.949, 154.65, 107.23, 154.592, 108.188); - p.cubicTo(154.554, 108.835, 153.173, 108.483, 152.83, 109.412); - p.cubicTo(152.185, 111.16, 154.016, 111.679, 154.772, 113.017); - p.cubicTo(154.97, 113.366, 154.706, 113.67, 154.391, 113.768); - p.cubicTo(153.98, 113.896, 153.196, 113.707, 153.334, 114.16); - p.cubicTo(154.306, 117.353, 151.55, 118.031, 149.201, 118.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeWidth = -1; - p.moveTo(139.6, 138.201); - p.cubicTo(139.593, 136.463, 137.992, 134.707, 139.201, 133.001); - p.cubicTo(139.336, 133.135, 139.467, 133.356, 139.601, 133.356); - p.cubicTo(139.736, 133.356, 139.867, 133.135, 140.001, 133.001); - p.cubicTo(141.496, 135.217, 145.148, 136.145, 145.006, 138.991); - p.cubicTo(144.984, 139.438, 143.897, 140.356, 144.801, 141.001); - p.cubicTo(142.988, 142.349, 142.933, 144.719, 142.001, 146.601); - p.cubicTo(140.763, 146.315, 139.551, 145.952, 138.401, 145.401); - p.cubicTo(138.753, 143.915, 138.636, 142.231, 139.456, 140.911); - p.cubicTo(139.89, 140.213, 139.603, 139.134, 139.6, 138.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-26.6, 129.201); - p.cubicTo(-26.6, 129.201, -43.458, 139.337, -29.4, 124.001); - p.cubicTo(-20.6, 114.401, -10.6, 108.801, -10.6, 108.801); - p.cubicTo(-10.6, 108.801, -0.2, 104.4, 3.4, 103.2); - p.cubicTo(7, 102, 22.2, 96.8, 25.4, 96.4); - p.cubicTo(28.6, 96, 38.2, 92, 45, 96); - p.cubicTo(51.8, 100, 59.8, 104.4, 59.8, 104.4); - p.cubicTo(59.8, 104.4, 43.4, 96, 39.8, 98.4); - p.cubicTo(36.2, 100.8, 29, 100.4, 23, 103.6); - p.cubicTo(23, 103.6, 8.2, 108.001, 5, 110.001); - p.cubicTo(1.8, 112.001, -8.6, 123.601, -10.2, 122.801); - p.cubicTo(-11.8, 122.001, -9.8, 121.601, -8.6, 118.801); - p.cubicTo(-7.4, 116.001, -9.4, 114.401, -17.4, 120.801); - p.cubicTo(-25.4, 127.201, -26.6, 129.201, -26.6, 129.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-19.195, 123.234); - p.cubicTo(-19.195, 123.234, -17.785, 110.194, -9.307, 111.859); - p.cubicTo(-9.307, 111.859, -1.081, 107.689, 1.641, 105.721); - p.cubicTo(1.641, 105.721, 9.78, 104.019, 11.09, 103.402); - p.cubicTo(29.569, 94.702, 44.288, 99.221, 44.835, 98.101); - p.cubicTo(45.381, 96.982, 65.006, 104.099, 68.615, 108.185); - p.cubicTo(69.006, 108.628, 58.384, 102.588, 48.686, 100.697); - p.cubicTo(40.413, 99.083, 18.811, 100.944, 7.905, 106.48); - p.cubicTo(4.932, 107.989, -4.013, 113.773, -6.544, 113.662); - p.cubicTo(-9.075, 113.55, -19.195, 123.234, -19.195, 123.234); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-23, 148.801); - p.cubicTo(-23, 148.801, -38.2, 146.401, -21.4, 144.801); - p.cubicTo(-21.4, 144.801, -3.4, 142.801, 0.6, 137.601); - p.cubicTo(0.6, 137.601, 14.2, 128.401, 17, 128.001); - p.cubicTo(19.8, 127.601, 49.8, 120.401, 50.2, 118.001); - p.cubicTo(50.6, 115.601, 56.2, 115.601, 57.8, 116.401); - p.cubicTo(59.4, 117.201, 58.6, 118.401, 55.8, 119.201); - p.cubicTo(53, 120.001, 21.8, 136.401, 15.4, 137.601); - p.cubicTo(9, 138.801, -2.6, 146.401, -7.4, 147.601); - p.cubicTo(-12.2, 148.801, -23, 148.801, -23, 148.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-3.48, 141.403); - p.cubicTo(-3.48, 141.403, -12.062, 140.574, -3.461, 139.755); - p.cubicTo(-3.461, 139.755, 5.355, 136.331, 7.403, 133.668); - p.cubicTo(7.403, 133.668, 14.367, 128.957, 15.8, 128.753); - p.cubicTo(17.234, 128.548, 31.194, 124.861, 31.399, 123.633); - p.cubicTo(31.604, 122.404, 65.67, 109.823, 70.09, 113.013); - p.cubicTo(73.001, 115.114, 63.1, 113.437, 53.466, 117.847); - p.cubicTo(52.111, 118.467, 18.258, 133.054, 14.981, 133.668); - p.cubicTo(11.704, 134.283, 5.765, 138.174, 3.307, 138.788); - p.cubicTo(0.85, 139.403, -3.48, 141.403, -3.48, 141.403); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-11.4, 143.601); - p.cubicTo(-11.4, 143.601, -6.2, 143.201, -7.4, 144.801); - p.cubicTo(-8.6, 146.401, -11, 145.601, -11, 145.601); - p.lineTo(-11.4, 143.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-18.6, 145.201); - p.cubicTo(-18.6, 145.201, -13.4, 144.801, -14.6, 146.401); - p.cubicTo(-15.8, 148.001, -18.2, 147.201, -18.2, 147.201); - p.lineTo(-18.6, 145.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-29, 146.801); - p.cubicTo(-29, 146.801, -23.8, 146.401, -25, 148.001); - p.cubicTo(-26.2, 149.601, -28.6, 148.801, -28.6, 148.801); - p.lineTo(-29, 146.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-36.6, 147.601); - p.cubicTo(-36.6, 147.601, -31.4, 147.201, -32.6, 148.801); - p.cubicTo(-33.8, 150.401, -36.2, 149.601, -36.2, 149.601); - p.lineTo(-36.6, 147.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(1.8, 108.001); - p.cubicTo(1.8, 108.001, 6.2, 108.001, 5, 109.601); - p.cubicTo(3.8, 111.201, 0.6, 110.801, 0.6, 110.801); - p.lineTo(1.8, 108.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-8.2, 113.601); - p.cubicTo(-8.2, 113.601, -1.694, 111.46, -4.2, 114.801); - p.cubicTo(-5.4, 116.401, -7.8, 115.601, -7.8, 115.601); - p.lineTo(-8.2, 113.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-19.4, 118.401); - p.cubicTo(-19.4, 118.401, -14.2, 118.001, -15.4, 119.601); - p.cubicTo(-16.6, 121.201, -19, 120.401, -19, 120.401); - p.lineTo(-19.4, 118.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-27, 124.401); - p.cubicTo(-27, 124.401, -21.8, 124.001, -23, 125.601); - p.cubicTo(-24.2, 127.201, -26.6, 126.401, -26.6, 126.401); - p.lineTo(-27, 124.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-33.8, 129.201); - p.cubicTo(-33.8, 129.201, -28.6, 128.801, -29.8, 130.401); - p.cubicTo(-31, 132.001, -33.4, 131.201, -33.4, 131.201); - p.lineTo(-33.8, 129.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(5.282, 135.598); - p.cubicTo(5.282, 135.598, 12.203, 135.066, 10.606, 137.195); - p.cubicTo(9.009, 139.325, 5.814, 138.26, 5.814, 138.26); - p.lineTo(5.282, 135.598); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(15.682, 130.798); - p.cubicTo(15.682, 130.798, 22.603, 130.266, 21.006, 132.395); - p.cubicTo(19.409, 134.525, 16.214, 133.46, 16.214, 133.46); - p.lineTo(15.682, 130.798); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(26.482, 126.398); - p.cubicTo(26.482, 126.398, 33.403, 125.866, 31.806, 127.995); - p.cubicTo(30.209, 130.125, 27.014, 129.06, 27.014, 129.06); - p.lineTo(26.482, 126.398); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(36.882, 121.598); - p.cubicTo(36.882, 121.598, 43.803, 121.066, 42.206, 123.195); - p.cubicTo(40.609, 125.325, 37.414, 124.26, 37.414, 124.26); - p.lineTo(36.882, 121.598); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(9.282, 103.598); - p.cubicTo(9.282, 103.598, 16.203, 103.066, 14.606, 105.195); - p.cubicTo(13.009, 107.325, 9.014, 107.06, 9.014, 107.06); - p.lineTo(9.282, 103.598); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(19.282, 100.398); - p.cubicTo(19.282, 100.398, 26.203, 99.866, 24.606, 101.995); - p.cubicTo(23.009, 104.125, 18.614, 103.86, 18.614, 103.86); - p.lineTo(19.282, 100.398); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-3.4, 140.401); - p.cubicTo(-3.4, 140.401, 1.8, 140.001, 0.6, 141.601); - p.cubicTo(-0.6, 143.201, -3, 142.401, -3, 142.401); - p.lineTo(-3.4, 140.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#992600"; - sfp.strokeWidth = -1; - p.moveTo(-76.6, 41.2); - p.cubicTo(-76.6, 41.2, -81, 50, -81.4, 53.2); - p.cubicTo(-81.4, 53.2, -80.6, 44.4, -79.4, 42.4); - p.cubicTo(-78.2, 40.4, -76.6, 41.2, -76.6, 41.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#992600"; - sfp.strokeWidth = -1; - p.moveTo(-95, 55.2); - p.cubicTo(-95, 55.2, -98.2, 69.6, -97.8, 72.4); - p.cubicTo(-97.8, 72.4, -99, 60.8, -98.6, 59.6); - p.cubicTo(-98.2, 58.4, -95, 55.2, -95, 55.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-74.2, -19.4); - p.lineTo(-74.4, -16.2); - p.lineTo(-76.6, -16); - p.cubicTo(-76.6, -16, -62.4, -3.4, -61.8, 4.2); - p.cubicTo(-61.8, 4.2, -61, -4, -74.2, -19.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-70.216, -18.135); - p.cubicTo(-70.647, -18.551, -70.428, -19.296, -70.836, -19.556); - p.cubicTo(-71.645, -20.072, -69.538, -20.129, -69.766, -20.845); - p.cubicTo(-70.149, -22.051, -69.962, -22.072, -70.084, -23.348); - p.cubicTo(-70.141, -23.946, -69.553, -25.486, -69.168, -25.926); - p.cubicTo(-67.722, -27.578, -69.046, -30.51, -67.406, -32.061); - p.cubicTo(-67.102, -32.35, -66.726, -32.902, -66.441, -33.32); - p.cubicTo(-65.782, -34.283, -64.598, -34.771, -63.648, -35.599); - p.cubicTo(-63.33, -35.875, -63.531, -36.702, -62.962, -36.61); - p.cubicTo(-62.248, -36.495, -61.007, -36.625, -61.052, -35.784); - p.cubicTo(-61.165, -33.664, -62.494, -31.944, -63.774, -30.276); - p.cubicTo(-63.323, -29.572, -63.781, -28.937, -64.065, -28.38); - p.cubicTo(-65.4, -25.76, -65.211, -22.919, -65.385, -20.079); - p.cubicTo(-65.39, -19.994, -65.697, -19.916, -65.689, -19.863); - p.cubicTo(-65.336, -17.528, -64.752, -15.329, -63.873, -13.1); - p.cubicTo(-63.507, -12.17, -63.036, -11.275, -62.886, -10.348); - p.cubicTo(-62.775, -9.662, -62.672, -8.829, -63.08, -8.124); - p.cubicTo(-61.045, -5.234, -62.354, -2.583, -61.185, 0.948); - p.cubicTo(-60.978, 1.573, -59.286, 3.487, -59.749, 3.326); - p.cubicTo(-62.262, 2.455, -62.374, 2.057, -62.551, 1.304); - p.cubicTo(-62.697, 0.681, -63.027, -0.696, -63.264, -1.298); - p.cubicTo(-63.328, -1.462, -63.499, -3.346, -63.577, -3.468); - p.cubicTo(-65.09, -5.85, -63.732, -5.674, -65.102, -8.032); - p.cubicTo(-66.53, -8.712, -67.496, -9.816, -68.619, -10.978); - p.cubicTo(-68.817, -11.182, -67.674, -11.906, -67.855, -12.119); - p.cubicTo(-68.947, -13.408, -70.1, -14.175, -69.764, -15.668); - p.cubicTo(-69.609, -16.358, -69.472, -17.415, -70.216, -18.135); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-73.8, -16.4); - p.cubicTo(-73.8, -16.4, -73.4, -9.6, -71, -8); - p.cubicTo(-68.6, -6.4, -69.8, -7.2, -73, -8.4); - p.cubicTo(-76.2, -9.6, -75, -10.4, -75, -10.4); - p.cubicTo(-75, -10.4, -77.8, -10, -75.4, -8); - p.cubicTo(-73, -6, -69.4, -3.6, -71, -3.6); - p.cubicTo(-72.6, -3.6, -80.2, -7.6, -80.2, -10.4); - p.cubicTo(-80.2, -13.2, -81.2, -17.3, -81.2, -17.3); - p.cubicTo(-81.2, -17.3, -80.1, -18.1, -75.3, -18); - p.cubicTo(-75.3, -18, -73.9, -17.3, -73.8, -16.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-74.6, 2.2); - p.cubicTo(-74.6, 2.2, -83.12, -0.591, -101.6, 2.8); - p.cubicTo(-101.6, 2.8, -92.569, 0.722, -73.8, 3); - p.cubicTo(-63.5, 4.25, -74.6, 2.2, -74.6, 2.2); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-72.502, 2.129); - p.cubicTo(-72.502, 2.129, -80.748, -1.389, -99.453, 0.392); - p.cubicTo(-99.453, 0.392, -90.275, -0.897, -71.774, 2.995); - p.cubicTo(-61.62, 5.131, -72.502, 2.129, -72.502, 2.129); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-70.714, 2.222); - p.cubicTo(-70.714, 2.222, -78.676, -1.899, -97.461, -1.514); - p.cubicTo(-97.461, -1.514, -88.213, -2.118, -70.052, 3.14); - p.cubicTo(-60.086, 6.025, -70.714, 2.222, -70.714, 2.222); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-69.444, 2.445); - p.cubicTo(-69.444, 2.445, -76.268, -1.862, -93.142, -2.96); - p.cubicTo(-93.142, -2.96, -84.803, -2.79, -68.922, 3.319); - p.cubicTo(-60.206, 6.672, -69.444, 2.445, -69.444, 2.445); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(45.84, 12.961); - p.cubicTo(45.84, 12.961, 44.91, 13.605, 45.124, 12.424); - p.cubicTo(45.339, 11.243, 73.547, -1.927, 77.161, -1.677); - p.cubicTo(77.161, -1.677, 46.913, 11.529, 45.84, 12.961); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(42.446, 13.6); - p.cubicTo(42.446, 13.6, 41.57, 14.315, 41.691, 13.121); - p.cubicTo(41.812, 11.927, 68.899, -3.418, 72.521, -3.452); - p.cubicTo(72.521, -3.452, 43.404, 12.089, 42.446, 13.6); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(39.16, 14.975); - p.cubicTo(39.16, 14.975, 38.332, 15.747, 38.374, 14.547); - p.cubicTo(38.416, 13.348, 58.233, -2.149, 68.045, -4.023); - p.cubicTo(68.045, -4.023, 50.015, 4.104, 39.16, 14.975); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(36.284, 16.838); - p.cubicTo(36.284, 16.838, 35.539, 17.532, 35.577, 16.453); - p.cubicTo(35.615, 15.373, 53.449, 1.426, 62.28, -0.26); - p.cubicTo(62.28, -0.26, 46.054, 7.054, 36.284, 16.838); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(4.6, 164.801); - p.cubicTo(4.6, 164.801, -10.6, 162.401, 6.2, 160.801); - p.cubicTo(6.2, 160.801, 24.2, 158.801, 28.2, 153.601); - p.cubicTo(28.2, 153.601, 41.8, 144.401, 44.6, 144.001); - p.cubicTo(47.4, 143.601, 63.8, 140.001, 64.2, 137.601); - p.cubicTo(64.6, 135.201, 70.6, 132.801, 72.2, 133.601); - p.cubicTo(73.8, 134.401, 73.8, 143.601, 71, 144.401); - p.cubicTo(68.2, 145.201, 49.4, 152.401, 43, 153.601); - p.cubicTo(36.6, 154.801, 25, 162.401, 20.2, 163.601); - p.cubicTo(15.4, 164.801, 4.6, 164.801, 4.6, 164.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(77.6, 127.401); - p.cubicTo(77.6, 127.401, 74.6, 129.001, 73.4, 131.601); - p.cubicTo(73.4, 131.601, 67, 142.201, 52.8, 145.401); - p.cubicTo(52.8, 145.401, 29.8, 154.401, 22, 156.401); - p.cubicTo(22, 156.401, 8.6, 161.401, 1.2, 160.601); - p.cubicTo(1.2, 160.601, -5.8, 160.801, 0.4, 162.401); - p.cubicTo(0.4, 162.401, 20.6, 160.401, 24, 158.601); - p.cubicTo(24, 158.601, 39.6, 153.401, 42.6, 150.801); - p.cubicTo(45.6, 148.201, 63.8, 143.201, 66, 141.201); - p.cubicTo(68.2, 139.201, 78, 130.801, 77.6, 127.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(18.882, 158.911); - p.cubicTo(18.882, 158.911, 24.111, 158.685, 22.958, 160.234); - p.cubicTo(21.805, 161.784, 19.357, 160.91, 19.357, 160.91); - p.lineTo(18.882, 158.911); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(11.68, 160.263); - p.cubicTo(11.68, 160.263, 16.908, 160.037, 15.756, 161.586); - p.cubicTo(14.603, 163.136, 12.155, 162.263, 12.155, 162.263); - p.lineTo(11.68, 160.263); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(1.251, 161.511); - p.cubicTo(1.251, 161.511, 6.48, 161.284, 5.327, 162.834); - p.cubicTo(4.174, 164.383, 1.726, 163.51, 1.726, 163.51); - p.lineTo(1.251, 161.511); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-6.383, 162.055); - p.cubicTo(-6.383, 162.055, -1.154, 161.829, -2.307, 163.378); - p.cubicTo(-3.46, 164.928, -5.908, 164.054, -5.908, 164.054); - p.lineTo(-6.383, 162.055); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(35.415, 151.513); - p.cubicTo(35.415, 151.513, 42.375, 151.212, 40.84, 153.274); - p.cubicTo(39.306, 155.336, 36.047, 154.174, 36.047, 154.174); - p.lineTo(35.415, 151.513); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(45.73, 147.088); - p.cubicTo(45.73, 147.088, 51.689, 143.787, 51.155, 148.849); - p.cubicTo(50.885, 151.405, 46.362, 149.749, 46.362, 149.749); - p.lineTo(45.73, 147.088); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(54.862, 144.274); - p.cubicTo(54.862, 144.274, 62.021, 140.573, 60.287, 146.035); - p.cubicTo(59.509, 148.485, 55.493, 146.935, 55.493, 146.935); - p.lineTo(54.862, 144.274); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(64.376, 139.449); - p.cubicTo(64.376, 139.449, 68.735, 134.548, 69.801, 141.21); - p.cubicTo(70.207, 143.748, 65.008, 142.11, 65.008, 142.11); - p.lineTo(64.376, 139.449); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(26.834, 155.997); - p.cubicTo(26.834, 155.997, 32.062, 155.77, 30.91, 157.32); - p.cubicTo(29.757, 158.869, 27.308, 157.996, 27.308, 157.996); - p.lineTo(26.834, 155.997); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(62.434, 34.603); - p.cubicTo(62.434, 34.603, 61.708, 35.268, 61.707, 34.197); - p.cubicTo(61.707, 33.127, 79.191, 19.863, 88.034, 18.479); - p.cubicTo(88.034, 18.479, 71.935, 25.208, 62.434, 34.603); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(65.4, 98.4); - p.cubicTo(65.4, 98.4, 87.401, 120.801, 96.601, 124.401); - p.cubicTo(96.601, 124.401, 105.801, 135.601, 101.801, 161.601); - p.cubicTo(101.801, 161.601, 98.601, 169.201, 95.401, 148.401); - p.cubicTo(95.401, 148.401, 98.601, 123.201, 87.401, 139.201); - p.cubicTo(87.401, 139.201, 79, 129.301, 85.4, 129.601); - p.cubicTo(85.4, 129.601, 88.601, 131.601, 89.001, 130.001); - p.cubicTo(89.401, 128.401, 81.4, 114.801, 64.2, 100.4); - p.cubicTo(47, 86, 65.4, 98.4, 65.4, 98.4); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(7, 137.201); - p.cubicTo(7, 137.201, 6.8, 135.401, 8.6, 136.201); - p.cubicTo(10.4, 137.001, 104.601, 143.201, 136.201, 167.201); - p.cubicTo(136.201, 167.201, 91.001, 144.001, 7, 137.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(17.4, 132.801); - p.cubicTo(17.4, 132.801, 17.2, 131.001, 19, 131.801); - p.cubicTo(20.8, 132.601, 157.401, 131.601, 181.001, 164.001); - p.cubicTo(181.001, 164.001, 159.001, 138.801, 17.4, 132.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(29, 128.801); - p.cubicTo(29, 128.801, 28.8, 127.001, 30.6, 127.801); - p.cubicTo(32.4, 128.601, 205.801, 115.601, 229.401, 148.001); - p.cubicTo(229.401, 148.001, 219.801, 122.401, 29, 128.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(39, 124.001); - p.cubicTo(39, 124.001, 38.8, 122.201, 40.6, 123.001); - p.cubicTo(42.4, 123.801, 164.601, 85.2, 188.201, 117.601); - p.cubicTo(188.201, 117.601, 174.801, 93, 39, 124.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-19, 146.801); - p.cubicTo(-19, 146.801, -19.2, 145.001, -17.4, 145.801); - p.cubicTo(-15.6, 146.601, 2.2, 148.801, 4.2, 187.601); - p.cubicTo(4.2, 187.601, -3, 145.601, -19, 146.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-27.8, 148.401); - p.cubicTo(-27.8, 148.401, -28, 146.601, -26.2, 147.401); - p.cubicTo(-24.4, 148.201, -10.2, 143.601, -13, 182.401); - p.cubicTo(-13, 182.401, -11.8, 147.201, -27.8, 148.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-35.8, 148.801); - p.cubicTo(-35.8, 148.801, -36, 147.001, -34.2, 147.801); - p.cubicTo(-32.4, 148.601, -17, 149.201, -29.4, 171.601); - p.cubicTo(-29.4, 171.601, -19.8, 147.601, -35.8, 148.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(11.526, 104.465); - p.cubicTo(11.526, 104.465, 11.082, 106.464, 12.631, 105.247); - p.cubicTo(28.699, 92.622, 61.141, 33.72, 116.826, 28.086); - p.cubicTo(116.826, 28.086, 78.518, 15.976, 11.526, 104.465); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(22.726, 102.665); - p.cubicTo(22.726, 102.665, 21.363, 101.472, 23.231, 100.847); - p.cubicTo(25.099, 100.222, 137.541, 27.72, 176.826, 35.686); - p.cubicTo(176.826, 35.686, 149.719, 28.176, 22.726, 102.665); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(1.885, 108.767); - p.cubicTo(1.885, 108.767, 1.376, 110.366, 3.087, 109.39); - p.cubicTo(12.062, 104.27, 15.677, 47.059, 59.254, 45.804); - p.cubicTo(59.254, 45.804, 26.843, 31.09, 1.885, 108.767); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-18.038, 119.793); - p.cubicTo(-18.038, 119.793, -19.115, 121.079, -17.162, 120.825); - p.cubicTo(-6.916, 119.493, 14.489, 78.222, 58.928, 83.301); - p.cubicTo(58.928, 83.301, 26.962, 68.955, -18.038, 119.793); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-6.8, 113.667); - p.cubicTo(-6.8, 113.667, -7.611, 115.136, -5.742, 114.511); - p.cubicTo(4.057, 111.237, 17.141, 66.625, 61.729, 63.078); - p.cubicTo(61.729, 63.078, 27.603, 55.135, -6.8, 113.667); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-25.078, 124.912); - p.cubicTo(-25.078, 124.912, -25.951, 125.954, -24.369, 125.748); - p.cubicTo(-16.07, 124.669, 1.268, 91.24, 37.264, 95.354); - p.cubicTo(37.264, 95.354, 11.371, 83.734, -25.078, 124.912); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-32.677, 130.821); - p.cubicTo(-32.677, 130.821, -33.682, 131.866, -32.091, 131.748); - p.cubicTo(-27.923, 131.439, 2.715, 98.36, 21.183, 113.862); - p.cubicTo(21.183, 113.862, 9.168, 95.139, -32.677, 130.821); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(36.855, 98.898); - p.cubicTo(36.855, 98.898, 35.654, 97.543, 37.586, 97.158); - p.cubicTo(39.518, 96.774, 160.221, 39.061, 198.184, 51.927); - p.cubicTo(198.184, 51.927, 172.243, 41.053, 36.855, 98.898); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(3.4, 163.201); - p.cubicTo(3.4, 163.201, 3.2, 161.401, 5, 162.201); - p.cubicTo(6.8, 163.001, 22.2, 163.601, 9.8, 186.001); - p.cubicTo(9.8, 186.001, 19.4, 162.001, 3.4, 163.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(13.8, 161.601); - p.cubicTo(13.8, 161.601, 13.6, 159.801, 15.4, 160.601); - p.cubicTo(17.2, 161.401, 35, 163.601, 37, 202.401); - p.cubicTo(37, 202.401, 29.8, 160.401, 13.8, 161.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(20.6, 160.001); - p.cubicTo(20.6, 160.001, 20.4, 158.201, 22.2, 159.001); - p.cubicTo(24, 159.801, 48.6, 163.201, 72.2, 195.601); - p.cubicTo(72.2, 195.601, 36.6, 158.801, 20.6, 160.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(28.225, 157.972); - p.cubicTo(28.225, 157.972, 27.788, 156.214, 29.678, 156.768); - p.cubicTo(31.568, 157.322, 52.002, 155.423, 90.099, 189.599); - p.cubicTo(90.099, 189.599, 43.924, 154.656, 28.225, 157.972); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(38.625, 153.572); - p.cubicTo(38.625, 153.572, 38.188, 151.814, 40.078, 152.368); - p.cubicTo(41.968, 152.922, 76.802, 157.423, 128.499, 192.399); - p.cubicTo(128.499, 192.399, 54.324, 150.256, 38.625, 153.572); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-1.8, 142.001); - p.cubicTo(-1.8, 142.001, -2, 140.201, -0.2, 141.001); - p.cubicTo(1.6, 141.801, 55, 144.401, 85.4, 171.201); - p.cubicTo(85.4, 171.201, 50.499, 146.426, -1.8, 142.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(-11.8, 146.001); - p.cubicTo(-11.8, 146.001, -12, 144.201, -10.2, 145.001); - p.cubicTo(-8.4, 145.801, 16.2, 149.201, 39.8, 181.601); - p.cubicTo(39.8, 181.601, 4.2, 144.801, -11.8, 146.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(49.503, 148.962); - p.cubicTo(49.503, 148.962, 48.938, 147.241, 50.864, 147.655); - p.cubicTo(52.79, 148.068, 87.86, 150.004, 141.981, 181.098); - p.cubicTo(141.981, 181.098, 64.317, 146.704, 49.503, 148.962); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(57.903, 146.562); - p.cubicTo(57.903, 146.562, 57.338, 144.841, 59.264, 145.255); - p.cubicTo(61.19, 145.668, 96.26, 147.604, 150.381, 178.698); - p.cubicTo(150.381, 178.698, 73.317, 143.904, 57.903, 146.562); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#ffffff"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 0.1; - p.moveTo(67.503, 141.562); - p.cubicTo(67.503, 141.562, 66.938, 139.841, 68.864, 140.255); - p.cubicTo(70.79, 140.668, 113.86, 145.004, 203.582, 179.298); - p.cubicTo(203.582, 179.298, 82.917, 138.904, 67.503, 141.562); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-43.8, 148.401); - p.cubicTo(-43.8, 148.401, -38.6, 148.001, -39.8, 149.601); - p.cubicTo(-41, 151.201, -43.4, 150.401, -43.4, 150.401); - p.lineTo(-43.8, 148.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-13, 162.401); - p.cubicTo(-13, 162.401, -7.8, 162.001, -9, 163.601); - p.cubicTo(-10.2, 165.201, -12.6, 164.401, -12.6, 164.401); - p.lineTo(-13, 162.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-21.8, 162.001); - p.cubicTo(-21.8, 162.001, -16.6, 161.601, -17.8, 163.201); - p.cubicTo(-19, 164.801, -21.4, 164.001, -21.4, 164.001); - p.lineTo(-21.8, 162.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-117.169, 150.182); - p.cubicTo(-117.169, 150.182, -112.124, 151.505, -113.782, 152.624); - p.cubicTo(-115.439, 153.744, -117.446, 152.202, -117.446, 152.202); - p.lineTo(-117.169, 150.182); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-115.169, 140.582); - p.cubicTo(-115.169, 140.582, -110.124, 141.905, -111.782, 143.024); - p.cubicTo(-113.439, 144.144, -115.446, 142.602, -115.446, 142.602); - p.lineTo(-115.169, 140.582); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#000000"; - sfp.strokeWidth = -1; - p.moveTo(-122.369, 136.182); - p.cubicTo(-122.369, 136.182, -117.324, 137.505, -118.982, 138.624); - p.cubicTo(-120.639, 139.744, -122.646, 138.202, -122.646, 138.202); - p.lineTo(-122.369, 136.182); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-42.6, 211.201); - p.cubicTo(-42.6, 211.201, -44.2, 211.201, -48.2, 213.201); - p.cubicTo(-50.2, 213.201, -61.4, 216.801, -67, 226.801); - p.cubicTo(-67, 226.801, -54.6, 217.201, -42.6, 211.201); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(45.116, 303.847); - p.cubicTo(45.257, 304.105, 45.312, 304.525, 45.604, 304.542); - p.cubicTo(46.262, 304.582, 47.495, 304.883, 47.37, 304.247); - p.cubicTo(46.522, 299.941, 45.648, 295.004, 41.515, 293.197); - p.cubicTo(40.876, 292.918, 39.434, 293.331, 39.36, 294.215); - p.cubicTo(39.233, 295.739, 39.116, 297.088, 39.425, 298.554); - p.cubicTo(39.725, 299.975, 41.883, 299.985, 42.8, 298.601); - p.cubicTo(43.736, 300.273, 44.168, 302.116, 45.116, 303.847); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(34.038, 308.581); - p.cubicTo(34.786, 309.994, 34.659, 311.853, 36.074, 312.416); - p.cubicTo(36.814, 312.71, 38.664, 311.735, 38.246, 310.661); - p.cubicTo(37.444, 308.6, 37.056, 306.361, 35.667, 304.55); - p.cubicTo(35.467, 304.288, 35.707, 303.755, 35.547, 303.427); - p.cubicTo(34.953, 302.207, 33.808, 301.472, 32.4, 301.801); - p.cubicTo(31.285, 304.004, 32.433, 306.133, 33.955, 307.842); - p.cubicTo(34.091, 307.994, 33.925, 308.37, 34.038, 308.581); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-5.564, 303.391); - p.cubicTo(-5.672, 303.014, -5.71, 302.551, -5.545, 302.23); - p.cubicTo(-5.014, 301.197, -4.221, 300.075, -4.558, 299.053); - p.cubicTo(-4.906, 297.997, -6.022, 298.179, -6.672, 298.748); - p.cubicTo(-7.807, 299.742, -7.856, 301.568, -8.547, 302.927); - p.cubicTo(-8.743, 303.313, -8.692, 303.886, -9.133, 304.277); - p.cubicTo(-9.607, 304.698, -10.047, 306.222, -9.951, 306.793); - p.cubicTo(-9.898, 307.106, -10.081, 317.014, -9.859, 316.751); - p.cubicTo(-9.24, 316.018, -6.19, 306.284, -6.121, 305.392); - p.cubicTo(-6.064, 304.661, -5.332, 304.196, -5.564, 303.391); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-31.202, 296.599); - p.cubicTo(-28.568, 294.1, -25.778, 291.139, -26.22, 287.427); - p.cubicTo(-26.336, 286.451, -28.111, 286.978, -28.298, 287.824); - p.cubicTo(-29.1, 291.449, -31.139, 294.11, -33.707, 296.502); - p.cubicTo(-35.903, 298.549, -37.765, 304.893, -38, 305.401); - p.cubicTo(-34.303, 300.145, -32.046, 297.399, -31.202, 296.599); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-44.776, 290.635); - p.cubicTo(-44.253, 290.265, -44.555, 289.774, -44.338, 289.442); - p.cubicTo(-43.385, 287.984, -42.084, 286.738, -42.066, 285); - p.cubicTo(-42.063, 284.723, -42.441, 284.414, -42.776, 284.638); - p.cubicTo(-43.053, 284.822, -43.395, 284.952, -43.503, 285.082); - p.cubicTo(-45.533, 287.531, -46.933, 290.202, -48.376, 293.014); - p.cubicTo(-48.559, 293.371, -49.703, 297.862, -49.39, 297.973); - p.cubicTo(-49.151, 298.058, -47.431, 293.877, -47.221, 293.763); - p.cubicTo(-45.958, 293.077, -45.946, 291.462, -44.776, 290.635); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-28.043, 310.179); - p.cubicTo(-27.599, 309.31, -26.023, 308.108, -26.136, 307.219); - p.cubicTo(-26.254, 306.291, -25.786, 304.848, -26.698, 305.536); - p.cubicTo(-27.955, 306.484, -31.404, 307.833, -31.674, 313.641); - p.cubicTo(-31.7, 314.212, -28.726, 311.519, -28.043, 310.179); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-13.6, 293.001); - p.cubicTo(-13.2, 292.333, -12.492, 292.806, -12.033, 292.543); - p.cubicTo(-11.385, 292.171, -10.774, 291.613, -10.482, 290.964); - p.cubicTo(-9.512, 288.815, -7.743, 286.995, -7.6, 284.601); - p.cubicTo(-9.091, 283.196, -9.77, 285.236, -10.4, 286.201); - p.cubicTo(-11.723, 284.554, -12.722, 286.428, -14.022, 286.947); - p.cubicTo(-14.092, 286.975, -14.305, 286.628, -14.38, 286.655); - p.cubicTo(-15.557, 287.095, -16.237, 288.176, -17.235, 288.957); - p.cubicTo(-17.406, 289.091, -17.811, 288.911, -17.958, 289.047); - p.cubicTo(-18.61, 289.65, -19.583, 289.975, -19.863, 290.657); - p.cubicTo(-20.973, 293.364, -24.113, 295.459, -26, 303.001); - p.cubicTo(-25.619, 303.91, -21.488, 296.359, -21.001, 295.661); - p.cubicTo(-20.165, 294.465, -20.047, 297.322, -18.771, 296.656); - p.cubicTo(-18.72, 296.629, -18.534, 296.867, -18.4, 297.001); - p.cubicTo(-18.206, 296.721, -17.988, 296.492, -17.6, 296.601); - p.cubicTo(-17.6, 296.201, -17.734, 295.645, -17.533, 295.486); - p.cubicTo(-16.296, 294.509, -16.38, 293.441, -15.6, 292.201); - p.cubicTo(-15.142, 292.99, -14.081, 292.271, -13.6, 293.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(46.2, 347.401); - p.cubicTo(46.2, 347.401, 53.6, 327.001, 49.2, 315.801); - p.cubicTo(49.2, 315.801, 60.6, 337.401, 56, 348.601); - p.cubicTo(56, 348.601, 55.6, 338.201, 51.6, 333.201); - p.cubicTo(51.6, 333.201, 47.6, 346.001, 46.2, 347.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(31.4, 344.801); - p.cubicTo(31.4, 344.801, 36.8, 336.001, 28.8, 317.601); - p.cubicTo(28.8, 317.601, 28, 338.001, 21.2, 349.001); - p.cubicTo(21.2, 349.001, 35.4, 328.801, 31.4, 344.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(21.4, 342.801); - p.cubicTo(21.4, 342.801, 21.2, 322.801, 21.6, 319.801); - p.cubicTo(21.6, 319.801, 17.8, 336.401, 7.6, 346.001); - p.cubicTo(7.6, 346.001, 22, 334.001, 21.4, 342.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(11.8, 310.801); - p.cubicTo(11.8, 310.801, 17.8, 324.401, 7.8, 342.801); - p.cubicTo(7.8, 342.801, 14.2, 330.601, 9.4, 323.601); - p.cubicTo(9.4, 323.601, 12, 320.201, 11.8, 310.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-7.4, 342.401); - p.cubicTo(-7.4, 342.401, -8.4, 326.801, -6.6, 324.601); - p.cubicTo(-6.6, 324.601, -6.4, 318.201, -6.8, 317.201); - p.cubicTo(-6.8, 317.201, -2.8, 311.001, -2.6, 318.401); - p.cubicTo(-2.6, 318.401, -1.2, 326.201, 1.6, 330.801); - p.cubicTo(1.6, 330.801, 5.2, 336.201, 5, 342.601); - p.cubicTo(5, 342.601, -5, 312.401, -7.4, 342.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-11, 314.801); - p.cubicTo(-11, 314.801, -17.6, 325.601, -19.4, 344.601); - p.cubicTo(-19.4, 344.601, -20.8, 338.401, -17, 324.001); - p.cubicTo(-17, 324.001, -12.8, 308.601, -11, 314.801); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-32.8, 334.601); - p.cubicTo(-32.8, 334.601, -27.8, 329.201, -26.4, 324.201); - p.cubicTo(-26.4, 324.201, -22.8, 308.401, -29.2, 317.001); - p.cubicTo(-29.2, 317.001, -29, 325.001, -37.2, 332.401); - p.cubicTo(-37.2, 332.401, -32.4, 330.001, -32.8, 334.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-38.6, 329.601); - p.cubicTo(-38.6, 329.601, -35.2, 312.201, -34.4, 311.401); - p.cubicTo(-34.4, 311.401, -32.6, 308.001, -35.4, 311.201); - p.cubicTo(-35.4, 311.201, -44.2, 330.401, -48.2, 337.001); - p.cubicTo(-48.2, 337.001, -40.2, 327.801, -38.6, 329.601); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-44.4, 313.001); - p.cubicTo(-44.4, 313.001, -32.8, 290.601, -54.6, 316.401); - p.cubicTo(-54.6, 316.401, -43.6, 306.601, -44.4, 313.001); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(-59.8, 298.401); - p.cubicTo(-59.8, 298.401, -55, 279.601, -52.4, 279.801); - p.cubicTo(-52.4, 279.801, -44.2, 270.801, -50.8, 281.401); - p.cubicTo(-50.8, 281.401, -56.8, 291.001, -56.2, 300.801); - p.cubicTo(-56.2, 300.801, -56.8, 291.201, -59.8, 298.401); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(270.5, 287); - p.cubicTo(270.5, 287, 258.5, 277, 256, 273.5); - p.cubicTo(256, 273.5, 269.5, 292, 269.5, 299); - p.cubicTo(269.5, 299, 272, 291.5, 270.5, 287); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(276, 265); - p.cubicTo(276, 265, 255, 250, 251.5, 242.5); - p.cubicTo(251.5, 242.5, 278, 272, 278, 276.5); - p.cubicTo(278, 276.5, 278.5, 267.5, 276, 265); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(293, 111); - p.cubicTo(293, 111, 281, 103, 279.5, 105); - p.cubicTo(279.5, 105, 290, 111.5, 292.5, 120); - p.cubicTo(292.5, 120, 291, 111, 293, 111); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "#cccccc"; - sfp.strokeWidth = -1; - p.moveTo(301.5, 191.5); - p.lineTo(284, 179.5); - p.cubicTo(284, 179.5, 303, 196.5, 303.5, 200.5); - p.lineTo(301.5, 191.5); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(-89.25, 169); - p.lineTo(-67.25, 173.75); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(-39, 331); - p.cubicTo(-39, 331, -39.5, 327.5, -48.5, 338); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(-33.5, 336); - p.cubicTo(-33.5, 336, -31.5, 329.5, -38, 334); - jsApiItem.appendVisualPath(p, sfp); - - p.clear(); sfp.clear(); - sfp.fillColor = "transparent"; - sfp.strokeColor = "#000000"; - sfp.strokeWidth = 1; - p.moveTo(20.5, 344.5); - p.cubicTo(20.5, 344.5, 22, 333.5, 10.5, 346.5); - jsApiItem.appendVisualPath(p, sfp); - - jsApiItem.commitVisualPaths(); - } - } -} diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml index 797aa9ca46..fd035715e0 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml index 5e22ebbf53..56b581bbcb 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_arc_fill.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml index 4b7d68ac3a..386096e467 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_cubic.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml index 30b33094fa..abf12c0378 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_linear_gradient.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml index 44e243b00f..b42cf7abef 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_lines.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml index 26ee8439a7..3a2bdda581 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_quad.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml index 536e3b1898..9ba3ebdfad 100644 --- a/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml +++ b/tests/manual/scenegraph_lancelot/data/pathitem/pathitem_spread.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import Qt.labs.pathitem 1.0 +import QtQuick.Shapes 1.0 Item { width: 320 diff --git a/tests/manual/pathitem/main.cpp b/tests/manual/shapestest/main.cpp index 35f0c9eb84..b9b93fbf9f 100644 --- a/tests/manual/pathitem/main.cpp +++ b/tests/manual/shapestest/main.cpp @@ -62,7 +62,7 @@ int main(int argc, char **argv) view.setResizeMode(QQuickView::SizeRootObjectToView); view.resize(1024, 768); - view.setSource(QUrl("qrc:/pathitemtest/pathitemtest.qml")); + view.setSource(QUrl("qrc:/shapestest/shapestest.qml")); view.show(); return app.exec(); diff --git a/tests/manual/shapestest/shapestest.pro b/tests/manual/shapestest/shapestest.pro new file mode 100644 index 0000000000..1776175134 --- /dev/null +++ b/tests/manual/shapestest/shapestest.pro @@ -0,0 +1,6 @@ +TEMPLATE = app + +QT += quick qml +SOURCES += main.cpp +RESOURCES += shapestest.qrc +OTHER_FILES += shapestest.qml diff --git a/tests/manual/shapestest/shapestest.qml b/tests/manual/shapestest/shapestest.qml new file mode 100644 index 0000000000..0971ea9da1 --- /dev/null +++ b/tests/manual/shapestest/shapestest.qml @@ -0,0 +1,418 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the QtQuick module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of The Qt Company Ltd nor the names of its +** contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.9 +import QtQuick.Shapes 1.0 + +Rectangle { + id: root + width: 1024 + height: 768 + + property color col: "lightsteelblue" + gradient: Gradient { + GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") } + GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") } + GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") } + GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") } + } + + Row { + anchors.top: parent.top + anchors.centerIn: parent + spacing: 20 + + Column { + spacing: 20 + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + id: triangle + anchors.fill: parent + ShapePath { + strokeWidth: 4 + strokeColor: "red" + fillGradient: ShapeLinearGradient { + x1: 0; y1: 0 + x2: 200; y2: 100 + ShapeGradientStop { position: 0; color: "blue" } + ShapeGradientStop { position: 0.2; color: "green" } + ShapeGradientStop { position: 0.4; color: "red" } + ShapeGradientStop { position: 0.6; color: "yellow" } + ShapeGradientStop { position: 1; color: "cyan" } + } + fillColor: "blue" // ignored with the gradient set + strokeStyle: ShapePath.DashLine + dashPattern: [ 1, 4 ] + Path { + PathLine { x: 200; y: 100 } + PathLine { x: 0; y: 100 } + PathLine { x: 0; y: 0 } + } + } + transform: Rotation { origin.x: 100; origin.y: 50; axis { x: 0; y: 1; z: 0 } + SequentialAnimation on angle { + NumberAnimation { from: 0; to: 75; duration: 2000 } + NumberAnimation { from: 75; to: -75; duration: 4000 } + NumberAnimation { from: -75; to: 0; duration: 2000 } + loops: Animation.Infinite + } + } + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + id: someCurve + property color sc: "gray" + strokeColor: sc + property color fc: "yellow" + fillColor: fc + Path { + startX: 20; startY: 10 + PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } + PathLine { x: 150; y: 80 } + PathQuad { x: 180; y: 10; controlX: 200; controlY: 80 } + PathLine { x: 20; y: 10 } + } + // Dynamic changes via property bindings etc. all work but can + // be computationally expense with the generic backend for properties + // that need retriangulating on every change. Should be cheap with NVPR. + NumberAnimation on strokeWidth { + from: 1; to: 20; duration: 10000 + } + } + } + // Changing colors for a solid stroke or fill is simple and + // (relatively) cheap. However, changing to/from transparent + // stroke/fill color and stroke width 0 are special as these + // change the scenegraph node tree (with the generic backend). + Timer { + interval: 2000 + running: true + repeat: true + onTriggered: someCurve.fillColor = (someCurve.fillColor === someCurve.fc ? "transparent" : someCurve.fc) + } + Timer { + interval: 1000 + running: true + repeat: true + onTriggered: someCurve.strokeColor = (someCurve.strokeColor === someCurve.sc ? "transparent" : someCurve.sc) + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 300 + height: 100 + Shape { + id: linesAndMoves + anchors.fill: parent + ShapePath { + strokeColor: "black" + Path { + startX: 0; startY: 50 + PathLine { relativeX: 100; y: 50 } + PathMove { relativeX: 100; y: 50 } + PathLine { relativeX: 100; y: 50 } + } + } + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 120 + Shape { + anchors.fill: parent + ShapePath { + id: joinTest + strokeColor: "black" + strokeWidth: 16 + fillColor: "transparent" + capStyle: ShapePath.RoundCap + Path { + startX: 30 + startY: 30 + PathLine { x: 100; y: 100 } + PathLine { x: 30; y: 100 } + } + } + } + Timer { + interval: 1000 + repeat: true + running: true + property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ] + onTriggered: { + for (var i = 0; i < styles.length; ++i) + if (styles[i] === joinTest.joinStyle) { + joinTest.joinStyle = styles[(i + 1) % styles.length]; + break; + } + } + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + id: star + strokeColor: "blue" + fillColor: "lightGray" + strokeWidth: 2 + Path { + PathMove { x: 90; y: 50 } + PathLine { x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI) } + PathLine { x: 90; y: 50 } + } + } + } + Timer { + interval: 1000 + onTriggered: star.fillRule = (star.fillRule === ShapePath.OddEvenFill ? ShapePath.WindingFill : ShapePath.OddEvenFill) + repeat: true + running: true + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + strokeWidth: 4 + strokeColor: "black" + fillColor: "transparent" + Path { + startX: 20; startY: 10 + PathCubic { + id: cb + x: 180; y: 10 + control1X: -10; control1Y: 90; control2Y: 90 + NumberAnimation on control2X { from: 400; to: 0; duration: 5000; loops: Animation.Infinite } + } + } + } + } + } + } + + Column { + spacing: 20 + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + fillColor: "transparent" + strokeColor: "red" + strokeWidth: 4 + Path { + startX: 10; startY: 40 + PathArc { + x: 10; y: 60 + radiusX: 40; radiusY: 40 + useLargeArc: true + } + } + } + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 200 + height: 200 + Rectangle { + anchors.centerIn: parent + // have a size smaller than 150x150 + width: 100 + height: 100 + // and enable clipping. Normally this goes via scissoring, unless + // some transform triggers the stencil-based path. Ensure this via rotation. + clip: true + NumberAnimation on rotation { + from: 0; to: 360; duration: 5000; loops: Animation.Infinite + } + + Shape { + width: 150 + height: 150 + + ShapePath { + fillColor: "blue" + strokeColor: "red" + strokeWidth: 4 + Path { + startX: 10; startY: 10 + PathLine { x: 140; y: 140 } + PathLine { x: 10; y: 140 } + PathLine { x: 10; y: 10 } + } + } + } + } + } + + // stencil clip test #2, something more complicated: + Rectangle { + border.color: "purple" + color: "transparent" + width: 150 + height: 150 + Rectangle { + anchors.centerIn: parent + width: 60 + height: 60 + clip: true + NumberAnimation on rotation { + from: 0; to: 360; duration: 5000; loops: Animation.Infinite + } + Shape { + width: 100 + height: 100 + ShapePath { + id: clippedStar + strokeColor: "blue" + fillColor: "lightGray" + strokeWidth: 2 + Path { + PathMove { x: 90; y: 50 } + PathLine { x: 50 + 40 * Math.cos(0.8 * 1 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 1 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 2 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 2 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 3 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 3 * Math.PI) } + PathLine { x: 50 + 40 * Math.cos(0.8 * 4 * Math.PI); y: 50 + 40 * Math.sin(0.8 * 4 * Math.PI) } + PathLine { x: 90; y: 50 } + } + } + } + Timer { + interval: 1000 + onTriggered: clippedStar.fillRule = (clippedStar.fillRule === ShapePath.OddEvenFill ? ShapePath.WindingFill : ShapePath.OddEvenFill) + repeat: true + running: true + } + } + } + + Rectangle { + border.color: "purple" + color: "transparent" + width: 100 + height: 100 + Shape { + anchors.fill: parent + ShapePath { + strokeColor: "red" + Path { + PathLine { x: 100; y: 100 } + } + } + ShapePath { + strokeColor: "blue" + Path { + startX: 100; startY: 0 + PathLine { x: 0; y: 100 } + } + } + } + } + } + } + + Rectangle { + id: stackTestRect + SequentialAnimation on opacity { + NumberAnimation { from: 0; to: 1; duration: 5000 } + PauseAnimation { duration: 2000 } + NumberAnimation { from: 1; to: 0; duration: 5000 } + PauseAnimation { duration: 2000 } + loops: Animation.Infinite + id: opAnim + } + color: "blue" + anchors.margins: 10 + anchors.fill: parent + } + MouseArea { + anchors.fill: parent + onClicked: stackTestRect.visible = !stackTestRect.visible + } +} diff --git a/tests/manual/shapestest/shapestest.qrc b/tests/manual/shapestest/shapestest.qrc new file mode 100644 index 0000000000..6bfc953997 --- /dev/null +++ b/tests/manual/shapestest/shapestest.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/shapestest"> + <file>shapestest.qml</file> + </qresource> +</RCC> |