QCanvasBrush Class
QCanvasBrush は、すべてのQCanvasPainter フィル / ストローク ブラシの基本クラスです。詳細...
| ヘッダー | #include <QCanvasBrush> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter) |
| 以来: | Qt 6.11 |
| によって継承されています: | QCanvasBoxShadow QCanvasCustomBrush, , , andQCanvasGradient QCanvasGridPattern QCanvasImagePattern |
| ステータス | 技術プレビュー |
パブリック型
| enum class | BrushType { Invalid, LinearGradient, RadialGradient, ConicalGradient, BoxGradient, …, Custom } |
パブリック関数
| QCanvasBrush() | |
| QCanvasBrush(QCanvasImage &&other) | |
| QCanvasBrush(const QCanvasBrush &brush) | |
| void | swap(QCanvasBrush &other) |
| QCanvasBrush::BrushType | type() const |
| QCanvasBrush & | operator=(QCanvasBrush &&other) |
| QCanvasBrush & | operator=(const QCanvasBrush &brush) |
詳細説明
QCanvasBrush は、QCanvasPainter::fill() およびQCanvasPainter::stroke() で使用されるすべてのスタイルの基本クラスです。
メンバ型ドキュメント
enum class QCanvasBrush::BrushType
ブラシの種類を指定する。
| 定数 | 値 | 説明 |
|---|---|---|
QCanvasBrush::BrushType::Invalid | 0 | - 空のブラシ。 |
QCanvasBrush::BrushType::LinearGradient | 1 | - 始点と終点間の色を補間する (QCanvasLinearGradient) |
QCanvasBrush::BrushType::RadialGradient | 2 | - 中心点とそれを囲む円上の端点間の色を補間します (QCanvasRadialGradient)。 |
QCanvasBrush::BrushType::ConicalGradient | 3 | - 中心点のまわりの色を補間 し ます (QCanvasConicalGradient)。 |
QCanvasBrush::BrushType::BoxGradient | 4 | - 丸い矩形上の色を補間します (QCanvasBoxGradient)。 |
QCanvasBrush::BrushType::BoxShadow | 5 | - ソフトな丸い矩形の影を作成します (QCanvasBoxShadow)。 |
QCanvasBrush::BrushType::ImagePattern | 6 | - 指定した画像と繰り返しを使ってパターンを作成します (QCanvasImagePattern)。 |
QCanvasBrush::BrushType::GridPattern | 7 | - 指定したグリッドを使用してパターンを作成します (QCanvasGridPattern)。 |
QCanvasBrush::BrushType::Custom | 1000 | - カスタムシェーダブラシ (QCanvasCustomBrush) を作成します。 |
type()も参照してください 。
メンバ関数ドキュメント
QCanvasBrush::QCanvasBrush()
無効なブラシを構築します。
[noexcept default] QCanvasBrush::QCanvasBrush(QCanvasImage &&other)
移動-other から新しい QCanvasBrush を構築します。
QCanvasBrush::QCanvasBrush(const QCanvasBrush &brush)
与えられたbrush のコピーであるブラシを構築する。
[noexcept] void QCanvasBrush::swap(QCanvasBrush &other)
このブラシをother と交換する。この操作は非常に速く、失敗することはない。
QCanvasBrush::BrushType QCanvasBrush::type() const
ブラシのタイプを返します。
[noexcept] QCanvasBrush &QCanvasBrush::operator=(QCanvasBrush &&other)
Move-other をこのQCanvasBrush インスタンスに割り当てる。
QCanvasBrush &QCanvasBrush::operator=(const QCanvasBrush &brush)
与えられたbrush をこのブラシに割り当て、このブラシへの参照を返します。
© 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.