blob: 1f3e03056d0f2c783029c33ddbc53696c5f137be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
//![0]
import QtQuick 2.0
Canvas {
width: 400; height: 200
contextType: "2d"
Path {
id: myPath
startX: 0; startY: 100
PathCurve { x: 75; y: 75 }
PathCurve { x: 200; y: 150 }
PathCurve { x: 325; y: 25 }
PathCurve { x: 400; y: 100 }
}
onPaint: {
context.strokeStyle = Qt.rgba(.4,.6,.8);
context.path = myPath;
context.stroke();
}
}
//![0]
|