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.