このページでは

PathMultiline QML Type

座標のリストのリストを通じて、ポリラインの集合を定義します。詳細...

Import Statement: import QtQuick
Since: QtQuick 2.14

プロパティ

詳細説明

この要素を使用すると、ポリラインのリストを一度に定義することができます。リスト内の各ポリラインの前にはmoveTo コマンドが挿入され、実質的に各ポリラインが独立したものとなります。このリスト内のポリラインは、互いに交差しないことが前提となっています。 いずれの場合も、ShapePath と組み合わせて使用する場合、包含するShapePath のShapePath::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配列のJS配列、QList またはQVector で構成されるQPolygonF 、あるいはQList<QList<QPointF>>が指定可能です。これをC++オブジェクトのカスタムプロパティにバインドする場合は、QList<QPolygonF> またはQList<QList<QPointF>> が最も適切な型となります。

start : point [read-only]

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

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