PySide6.QtGui.QRhiScissor¶
- class QRhiScissor¶
Specifies a scissor rectangle.
Details
Used with
setScissor(). Setting a scissor rectangle is only possible with aQRhiGraphicsPipelinethat hasUsesScissorset.QRhiassumes 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 intoQRhiScissoras-is, without any adaptation.Added in version 6.6.
Synopsis¶
Methods¶
def
__init__()def
__ne__()def
__eq__()def
scissor()def
setScissor()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
Constructs an empty scissor.
- __init__(x, y, w, h)
- Parameters:
x – int
y – int
w – int
h – int
Constructs a scissor with the rectangle specified by
x,y,w, andh.Note
xandyare assumed to be the bottom-left position. Negativeworhare not allowed, such scissor rectangles will be ignored byQRhiCommandBuffer. Other than that, the flexible OpenGL semantics apply: negative x and y, partially out of bounds rectangles, etc. will be handled gracefully, clamping as appropriate.- __ne__(b)¶
- Parameters:
b –
QRhiScissor- Return type:
bool
- __eq__(b)¶
- Parameters:
b –
QRhiScissor- Return type:
bool
- scissor()¶
- Return type:
.std.arrayint,4
Returns the scissor position and size.
See also
- setScissor(x, y, w, h)¶
- Parameters:
x – int
y – int
w – int
h – int
Sets the scissor position and size to
x,y,w,h.Note
The position is always expected to be specified in a coordinate system that has its origin in the bottom-left corner, like OpenGL.
See also