PathCurve QML Type
Define um ponto em uma curva de Catmull-Rom. Mais...
| Import Statement: | import QtQuick |
Propriedades
Descrição detalhada
PathCurve oferece uma maneira fácil de especificar uma curva que passa diretamente por um conjunto de pontos. Normalmente, várias PathCurves são usadas em série, como demonstra o exemplo a seguir:
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();
}
}Este exemplo produz o seguinte caminho (com o ponto inicial e os pontos da PathCurve destacados em vermelho):

Veja também Path, PathLine, PathQuad, PathCubic, PathArc e PathSvg.
Documentação de propriedades
Define o ponto final da curva em relação ao seu ponto inicial.
Se forem especificadas tanto uma posição final relativa quanto uma absoluta para um único eixo, será utilizada a posição relativa.
É possível misturar posições relativas e absolutas; por exemplo, é válido definir um eixo x relativo e um eixo y absoluto.
Define o ponto final da 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.