このページでは

PathCurve QML Type

Catmull-Rom曲線上の点を定義します。詳細...

Import Statement: import QtQuick

プロパティ

詳細な説明

PathCurve を使用すると、一連の点を直接通る曲線を簡単に指定できます。通常、以下の例に示すように、複数の PathCurve を連続して使用します。

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();
    }
}

この例では、次のようなパスが生成されます(始点と PathCurve の各点は赤で強調表示されています):

波状のパターンをなす、赤で強調表示された5つの点を通るキャットマル・ロム曲線

関連項目: Path 、PathLine 、PathQuad 、PathCubic 、PathArc 、およびPathSvg 。

プロパティのドキュメント

relativeX : real

relativeY : real

曲線の始点に対する終点を定義します。

1つの軸に対して相対位置と絶対位置の両方が指定された場合、相対位置が使用されます。

相対位置と絶対位置を混在させることも可能です。たとえば、x 軸を相対位置、y 軸を絶対位置に設定することも有効です。

x およびyも参照してください 。

x : real

y : real

曲線の終点を定義します。

relativeX およびrelativeYも参照してください 。

© 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.