PathRectangle QML Type
선택적으로 모서리가 둥근 직사각형을 정의합니다. 더 보기...
Import Statement: | import QtQuick |
Since: | QtQuick 6.8 |
속성
- bottomLeftRadius : real
- bottomRightRadius : real
- height : real
- radius : real
- relativeX : real
- relativeY : real
- strokeAdjustment : real
- topLeftRadius : real
- topRightRadius : real
- width : real
- x : real
- y : real
자세한 설명
PathRectangle은 모서리가 둥근 직사각형을 쉽게 지정할 수 있는 방법을 제공합니다. 이 API는 Rectangle 항목에 해당합니다.
Path, PathLine, PathQuad, PathCubic, PathArc, PathAngleArc, PathCurve, PathSvg 를참조하세요 .
속성 문서
radius : real |
이 속성은 둥근 직사각형을 정의하는 데 사용되는 모서리 반경을 정의합니다.
반경이 양수 값이면 직사각형 경로가 둥근 직사각형으로 정의되고, 그렇지 않으면 일반 직사각형으로 정의됩니다.
이 속성은 개별 모서리 반경 속성에 의해 재정의될 수 있습니다.
topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius 을참조하십시오 .
strokeAdjustment : real |
이 속성은 직사각형 좌표에 대한 획 폭 조정을 정의합니다.
스트로킹이 활성화된 ShapePath 에서 사용하는 경우 실제 스트로크된 사각형은 기본적으로 정의된 사각형 너비의 절반만큼 모든 면에서 스트로크 너비를 초과하여 확장됩니다. 이는 경로가 스트로킹의 중간점을 정의하고 QPainter 및 SVG 렌더링에 해당하므로 예상되는 동작입니다.
대신 테두리가 있는 Rectangle 항목처럼 정의된 직사각형을 스트로크된 직사각형의 바깥쪽 가장자리로 설정하려면 스트로크 폭에 strokeAdjustment를 설정하면 됩니다. 이렇게 하면 모든 가장자리가 스트로크 너비의 절반만큼 안쪽으로 이동합니다. 다음 예시와 같습니다:
ShapePath { id: myRec fillColor: "white" strokeColor: "black" strokeWidth: 16 joinStyle: ShapePath.MiterJoin PathRectangle { x: 10; y: 10; width: 200; height: 100; strokeAdjustment: myRec.strokeWidth } }
© 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.