conicalgradient2d QML Value Type
QCanvasConicalGradient に対する conicalgradient2d 型のマッチングを提供します。詳細...
| Import Statement: | import QtCanvas2D |
| Since: | Qt 6.12 |
| Status: | Technology preview |
この型はテクノロジープレビュー段階にあり、変更される可能性があります。
メソッド
- void addColorStop(real offset, string color)
- point centerPosition()
- void setCenterPosition(real x, real y)
- void setCenterPosition(point center)
- void setStartAngle(real angle)
- real startAngle()
詳細な説明
この値型は、QtCanvas2D のインポートによって提供されます。
「QCanvasConicalGradient」も参照してください 。
メソッドのドキュメント
void addColorStop(real offset, string color)
指定されたcolor を持つカラーストップを、指定されたoffset のグラデーションに追加します。0.0はグラデーションの一方の端でのオフセット、1.0は他方の端でのオフセットを表します。
例:
const gradient = ctx.createConicalGradient(100, 100, Math.PI / 2);
gradient.addColorStop(0.0, Qt.rgba(1, 0, 0, 1));
gradient.addColorStop(0.5, "#ff8040");
gradient.addColorStop(1.0, "red");point centerPosition()
円錐グラデーションの中心点を返します。
setCenterPosition()も参照してください 。
void setCenterPosition(real x, real y)
円錐グラデーションの中心点を (x,y) に設定します。
centerPosition()も参照してください 。
void setCenterPosition(point center)
円錐グラデーションの中心点をcenter に設定します。
これはオーバーロードされた関数です。
void setStartAngle(real angle)
円錐グラデーションの開始角度を、ラジアン単位でangle に設定します。角度は、中心から右方向に水平に伸びる線から始まり、時計回りに進行します。
startAngle()も参照してください 。
real startAngle()
円錐グラデーションの開始角度をラジアン単位で返します。
setStartAngle()も参照してください 。
© 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.