PathMultiline QML Type

座標リストのリストを通してポリラインのセットを定義します。詳細...

Import Statement: import QtQuick
Since: QtQuick 2.14

プロパティ

詳細説明

この要素は一度にポリラインのリストを定義することができる。リスト内の各ポリラインの前にはmoveTo コマンドが置かれ、事実上、各ポリラインは別々のものになる。このリストのポリラインは互いに交差しないものとする。いずれにせよ、ShapePath と併用する場合は、ShapePathShapePath::fillRule が適用されます。つまり、デフォルトのOddEvenFill と交差しないシェイプでは、リスト内の最大のシェイプが塗りつぶされる領域を定義し、2つのシェイプが重なる領域は穴となり、3つのシェイプが重なる領域は穴の内側の塗りつぶされた領域となる。

以下の例では、シンボルの各パスをパスのリストに追加して高電圧シンボルを作成している。頂点の座標は正規化され、包含シェイプのscale プロパティを通して、パスは包含シェイプと一緒に再スケーリングされます。

PathMultiline {
    paths: [
            [Qt.point(0.5,     0.06698),
             Qt.point(1,       0.93301),
             Qt.point(0,       0.93301),
             Qt.point(0.5,     0.06698)],

            [Qt.point(0.5,     0.12472),
             Qt.point(0.95,    0.90414),
             Qt.point(0.05,    0.90414),
             Qt.point(0.5,     0.12472)],

            [Qt.point(0.47131, 0.32986),
             Qt.point(0.36229, 0.64789),
             Qt.point(0.51492, 0.58590),
             Qt.point(0.47563, 0.76014),
             Qt.point(0.44950, 0.73590),
             Qt.point(0.46292, 0.83392),
             Qt.point(0.52162, 0.75190),
             Qt.point(0.48531, 0.76230),
             Qt.point(0.57529, 0.53189),
             Qt.point(0.41261, 0.59189),
             Qt.point(0.53001, 0.32786),
             Qt.point(0.47131, 0.32986)]
           ]
}

Path,QPainterPath::setFillRule,PathPolyline,PathQuad,PathCubic,PathArc,PathAngleArc,PathCurve,PathSvg,PathMoveも参照してください

プロパティの説明

paths : list<list<point>>

このプロパティは、ポリラインの頂点を定義する。

これは、Qt.point() で構築された点の JS 配列、QPolygonFQList またはQVector 、またはQVector<QVector<QPointF>> とすることができます。これを C++ オブジェクトのカスタムプロパティにバインドする場合は、QVector<QPolygonF> またはQVector<QVector<QPointF>> を使用するのが最適です。


start : point [read-only]

この読み取り専用のプロパティには、ポリラインの始点が含まれます。


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