PathMultiline QML Type

좌표 목록 목록을 통해 폴리라인 집합을 정의합니다. 더 보기...

Import Statement: import QtQuick
Since: QtQuick 2.14

속성

상세 설명

이 요소를 사용하면 폴리라인 목록을 한 번에 정의할 수 있습니다. 목록의 각 폴리라인 앞에는 moveTo 명령이 붙어서 각 폴리라인을 별도의 폴리라인으로 만듭니다. 이 목록의 폴리라인은 서로 교차하지 않아야 합니다. 어떤 경우든 ShapePath 와 함께 사용하면 ShapePathShapePath::fillRule 이 적용됩니다. 즉, 기본값인 OddEvenFill 과 교차하지 않는 도형을 사용하면 목록에서 가장 큰 도형이 채워질 영역을 정의하고, 두 도형이 겹치는 영역은 구멍, 세 도형이 겹치는 영역은 구멍 안쪽의 채워진 영역 등으로 정의합니다.

아래 예는 심볼의 각 경로를 경로 목록에 추가하여 고전압 심볼을 만듭니다. 정점의 좌표는 정규화되고 포함 도형의 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(), QList 또는 QVectorQPolygonF, 또는 QVector<QVector<QPointF>>로 구성된 점의 JS 배열일 수 있습니다. 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.