PathCurve QML Type
Definisce un punto su una curva di Catmull-Rom. Altro...
| Import Statement: | import QtQuick |
Proprietà
Descrizione dettagliata
PathCurve offre un modo semplice per specificare una curva che passa direttamente attraverso un insieme di punti. In genere, vengono utilizzate più PathCurve in serie, come dimostra l'esempio seguente:
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();
}
}Questo esempio produce il seguente percorso (con il punto iniziale e i punti della PathCurve evidenziati in rosso):

Vedi anche Path, PathLine, PathQuad, PathCubic, PathArc e PathSvg.
Documentazione sulla proprietà
Definisce il punto finale della curva rispetto al suo punto iniziale.
Se per un singolo asse vengono specificate sia una posizione finale relativa che una assoluta, verrà utilizzata la posizione relativa.
È possibile combinare posizioni relative e assolute; ad esempio, è valido impostare una posizione x relativa e una y assoluta.
Definisce il punto finale della curva.
© 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.