QCanvasConicalGradient Class
QCanvasConicalGradientは、円錐形のグラデーションを描くためのブラシです。詳細...
| ヘッダー | #include <QCanvasConicalGradient> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter) |
| 以来: | Qt 6.11 |
| を継承しています: | QCanvasGradient |
| ステータス | 技術プレビュー |
パブリック関数
| QCanvasConicalGradient() | |
| QCanvasConicalGradient(QPointF center, float startAngle) | |
| QCanvasConicalGradient(float centerX, float centerY, float startAngle) | |
| float | angle() const |
| QPointF | centerPosition() const |
| void | setAngle(float angle) |
| void | setCenterPosition(float x, float y) |
| void | setCenterPosition(QPointF center) |
詳しい説明
与えられた座標の点を中心に、始点と終点の間の色を補間する円錐グラデーション。角度は、中心から右に水平に向かう線から始まり、時計回りに進みます。

以下に簡単な例を示す:
![]() | QRectF rect(20, 20, 160, 160); QCanvasConicalGradient cg(rect.center(), 1.75 * M_PI); cg.setColorAt(0.0, "#fdbb2d"); cg.setColorAt(0.5, "#1a2a6c"); cg.setColorAt(1.0, "#fdbb2d"); p->setFillStyle(cg); p->beginPath(); p->ellipse(rect); p->fill(); |
メンバー関数ドキュメント
QCanvasConicalGradient::QCanvasConicalGradient()
デフォルトの円錐グラデーションを作成します。グラデーションの中心位置は (0, 0) です。グラデーションの角度は 0.0。グラデーションの開始色は白 (255, 255, 255)、終了色は透明な黒 (0, 0, 0, 0)。
QCanvasConicalGradient::QCanvasConicalGradient(QPointF center, float startAngle)
円錐形のグラデーションを作成します。勾配の中心位置はcenter 。グラデーションの開始角度はstartAngle 。グラデーションの開始色は白 (255, 255, 255)、終了色は透明な黒 (0, 0, 0, 0)。
QCanvasConicalGradient::QCanvasConicalGradient(float centerX, float centerY, float startAngle)
円錐形のグラデーションを作ります。グラデーションの中心位置は (centerX,centerY) です。グラデーションの開始角度はstartAngle 。グラデーションの開始色は白 (255, 255, 255)、終了色は透明な黒 (0, 0, 0, 0)。
float QCanvasConicalGradient::angle() const
円錐勾配の開始角度をラジアン単位で返します。
setAngle()も参照 。
QPointF QCanvasConicalGradient::centerPosition() const
円錐勾配の中心点を返します。
setCenterPosition()も参照 。
void QCanvasConicalGradient::setAngle(float angle)
円錐グラデーションの開始角度をラジアン単位でangle に設定する。角度は、中心から右に水平に向かう線から始まり、時計回りに進みます。
angle()も参照 。
void QCanvasConicalGradient::setCenterPosition(float x, float y)
円錐グラデーションの中心点を (x,y) に設定します。
centerPosition()も参照 。
void QCanvasConicalGradient::setCenterPosition(QPointF center)
円錐勾配の中心点をcenter に設定する。
これはオーバーロードされた関数です。
© 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.
