| 1 |
import QtQuick 2.9 |
| 2 |
import tst_qquickpathitem 1.0 |
| 3 |
|
| 4 |
Item { |
| 5 |
width: 200 |
| 6 |
height: 150 |
| 7 |
|
| 8 |
Shape { |
| 9 |
vendorExtensionsEnabled: false |
| 10 |
objectName: "pathItem" |
| 11 |
anchors.fill: parent |
| 12 |
|
| 13 |
ShapePath { |
| 14 |
strokeColor: "red" |
| 15 |
fillColor: "green" |
| 16 |
startX: 40; startY: 30 |
| 17 |
PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } |
| 18 |
PathLine { x: 150; y: 80 } |
| 19 |
PathQuad { x: 160; y: 30; controlX: 200; controlY: 80 } |
| 20 |
} |
| 21 |
|
| 22 |
ShapePath { |
| 23 |
strokeWidth: 10 |
| 24 |
fillColor: "transparent" |
| 25 |
strokeColor: "blue" |
| 26 |
startX: 40; startY: 30 |
| 27 |
PathCubic { x: 50; y: 80; control1X: 0; control1Y: 80; control2X: 100; control2Y: 100 } |
| 28 |
} |
| 29 |
|
| 30 |
ShapePath { |
| 31 |
fillGradient: LinearGradient { |
| 32 |
y2: 150 |
| 33 |
GradientStop { position: 0; color: "yellow" } |
| 34 |
GradientStop { position: 1; color: "green" } |
| 35 |
} |
| 36 |
|
| 37 |
startX: 10; startY: 100 |
| 38 |
PathArc { |
| 39 |
relativeX: 50; y: 100 |
| 40 |
radiusX: 25; radiusY: 25 |
| 41 |
} |
| 42 |
PathArc { |
| 43 |
relativeX: 50; y: 100 |
| 44 |
radiusX: 25; radiusY: 35 |
| 45 |
} |
| 46 |
PathArc { |
| 47 |
relativeX: 50; y: 100 |
| 48 |
radiusX: 25; radiusY: 60 |
| 49 |
} |
| 50 |
PathArc { |
| 51 |
relativeX: 50; y: 100 |
| 52 |
radiusX: 50; radiusY: 120 |
| 53 |
} |
| 54 |
} |
| 55 |
} |
| 56 |
} |