PathCurve QML Type
Definiert einen Punkt auf einer Catmull-Rom-Kurve. Mehr...
| Import Statement: | import QtQuick |
Eigenschaften
Ausführliche Beschreibung
Mit „PathCurve“ lässt sich auf einfache Weise eine Kurve definieren, die direkt durch eine Reihe von Punkten verläuft. In der Regel werden mehrere „PathCurves“ hintereinander verwendet, wie das folgende Beispiel zeigt:
import QtQuick
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();
}
}Dieses Beispiel erzeugt den folgenden Pfad (wobei der Startpunkt und die PathCurve-Punkte rot hervorgehoben sind):

Siehe auch Path, PathLine, PathQuad, PathCubic, PathArc und PathSvg.
Dokumentation zu Eigenschaften
Definiert den Endpunkt der Kurve relativ zu ihrem Startpunkt.
Wenn für eine einzelne Achse sowohl eine relative als auch eine absolute Endposition angegeben werden, wird die relative Position verwendet.
Relative und absolute Positionen können gemischt werden; so ist es beispielsweise zulässig, eine relative x- und eine absolute y-Position festzulegen.
Legt den Endpunkt der Kurve fest.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.