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 x와 y가 왼쪽 아래인 OpenGL 스타일의 가위 좌표를 가정합니다. 음수 너비나 높이는 허용되지 않습니다. 그러나 그 외에는 유연한 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)
seed 을 사용하여 key 에 대한 해시값을 반환합니다.
[noexcept]
bool operator!=(const QRhiScissor &a, const QRhiScissor &b)
두 개의 QRhiScissor 객체 a 와 b 의 값이 같으면 false
를 반환하고, 그렇지 않으면 true
를 반환합니다.
[noexcept]
bool operator==(const QRhiScissor &a, const QRhiScissor &b)
두 개의 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.