本页内容

C

PathCubic QML Type

定义一条具有两个控制点的三次贝塞尔曲线。更多...

Import Statement: import QtQuick
Since: Qt Quick Ultralite 1.8

属性

详细说明

以下 QML 代码将生成如下所示的路径:

由起点、终点和两个控制点定义的立方贝塞尔曲线。

import QtQuick
import QtQuick.Shapes
Rectangle {
    width: 300
    height: 300
    Shape {
        ShapePath {
            strokeColor: "black"
            startX: 20; startY: 0
            PathCubic {
                x: 180; y: 0
                control1X: -10; control1Y: 90
                control2X: 210; control2Y: 90
            }
        }
    }
}

注意:要 导入QtQuick.Shapes ,必须将Qul::Shapes 模块链接到您的项目中。有关更多信息,请参阅 Qt Quick Ultralite Shapes QML Types。

另请参阅 Path 、PathQuad 、PathLine 、PathArc 以及PathSvg 。

属性文档

control1X : real

control1Y : real

定义第一个控制点的位置。

control2X : real

control2Y : real

定义第二个控制点的位置。

x : real

y : real

定义曲线的端点。

在某些 Qt 许可下可用。
了解更多信息。