PathMultiline QML Type
좌표 목록의 목록을 통해 폴리라인 집합을 정의합니다. 더 보기...
| Import Statement: | import QtQuick |
| Since: | QtQuick 2.14 |
속성
상세 설명
이 요소를 사용하면 폴리라인 목록을 한 번에 정의할 수 있습니다. 목록에 포함된 각 폴리라인 앞에는 ` moveTo ` 명령이 삽입되어, 각 폴리라인이 사실상 독립된 개체로 처리됩니다. 이 목록에 포함된 폴리라인들은 서로 교차하지 않아야 합니다. 어떠한 경우든, ShapePath 와 함께 사용될 때, 포함된 ShapePath 의 ShapePath::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()`로 생성된 점의 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.