|
| QRhiScissor ()=default |
| Constructs an empty scissor.
|
|
| QRhiScissor (int x, int y, int w, int h) |
| Constructs a scissor with the rectangle specified by x, y, w, and h.
|
|
std::array< int, 4 > | scissor () const |
|
void | setScissor (int x, int y, int w, int h) |
| Sets the scissor position and size to x, y, w, h.
|
|
\inmodule QtGui
- Since
- 6.6
Specifies a scissor rectangle.
Used with QRhiCommandBuffer::setScissor(). Setting a scissor rectangle is only possible with a QRhiGraphicsPipeline that has QRhiGraphicsPipeline::UsesScissor set.
QRhi assumes OpenGL-style scissor coordinates, meaning x and y are bottom-left. Negative width or height are not allowed. However, apart from that, the flexible OpenGL semantics apply: negative x and y, partially out of bounds rectangles, etc. will be handled gracefully, clamping as appropriate. Therefore, any rendering logic targeting OpenGL can feed scissor rectangles into QRhiScissor as-is, without any adaptation.
- Note
- This is a RHI API with limited compatibility guarantees, see \l QRhi for details.
- See also
- QRhiCommandBuffer::setScissor(), QRhiViewport
Definition at line 137 of file qrhi.h.