QRhiScissor Class
シザー矩形を指定する。さらに...
ヘッダ: | #include <rhi/qrhi.h> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
qmake: | QT += gui-private |
以来: | Qt 6.6 |
パブリック関数
QRhiScissor() | |
QRhiScissor(int x, int y, int w, int h) | |
std::array<int, 4> | scissor() const |
void | setScissor(int x, int y, int w, int h) |
関連する非メンバー
size_t | qHash(const QRhiScissor &key, size_t seed = 0) |
bool | operator!=(const QRhiScissor &a, const QRhiScissor &b) |
bool | operator==(const QRhiScissor &a, const QRhiScissor &b) |
詳細説明
QRhiCommandBuffer::setScissor() と共に使用します。シザー矩形の設定は、QRhiGraphicsPipeline::UsesScissor が設定されたQRhiGraphicsPipeline でのみ可能です。
QRhi はOpenGLスタイルのシザー座標、つまりxとyが左下であることを仮定します。負の幅や高さは許されません。しかし、それを除けば、柔軟なOpenGLのセマンティクスが適用されます:負のxとy、部分的に境界から外れた矩形などは、適切にクランプされ、優雅に処理されます。したがって、OpenGLをターゲットとするレンダリングロジックは、QRhiScissorに矩形をそのまま送り込むことができます。
注意: これは互換性保証に制限のあるRHI APIです。詳細はQRhi 。
QRhiCommandBuffer::setScissor() およびQRhiViewportも参照して ください。
メンバ関数ドキュメント
[constexpr noexcept]
QRhiScissor::QRhiScissor()
空のシザーを構築する。
QRhiScissor::QRhiScissor(int x, int y, int w, int h)
x,y,w,h で指定される矩形でシザーを構築する。
注: x とy は左下の位置と仮定されます。w やh を負にすることはできません.そのような矩形はQRhiCommandBuffer によって無視されます.それ以外は、柔軟なOpenGLのセマンティクスが適用されます:負のxとy、部分的に境界から外れた矩形などは、適切にクランプされ、優雅に処理されます。
std::array<int, 4> QRhiScissor::scissor() const
シザーの位置とサイズを返す。
setScissor()も参照 。
void QRhiScissor::setScissor(int x, int y, int w, int h)
シザーの位置とサイズをx,y,w,h に設定します。
注意: 位置は常にOpenGLのように左下隅を原点とする座標系で指定されることが期待されます。
scissor()も参照してください 。
関連する非会員
[noexcept]
size_t qHash(const QRhiScissor &key, size_t seed = 0)
key のハッシュ値を返す。計算のシードにはseed を使用する。
[noexcept]
bool operator!=(const QRhiScissor &a, const QRhiScissor &b)
2つのQRhiScissor オブジェクトa とb の値が等しい場合はfalse
を返し、そうでない場合はtrue
を返す。
[noexcept]
bool operator==(const QRhiScissor &a, const QRhiScissor &b)
2つのQRhiScissor オブジェクトa とb の値が等しい場合、true
を返す。
© 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.