이 페이지에서

QRhiScissor Class

가위 모양의 사각형을 지정합니다. 더 보기...

헤더: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
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에 그대로 전달할 수 있습니다.

참고: 이 API는 호환성 보장이 제한된 RHI API입니다. 자세한 내용은 QRhi 를 참조하십시오.

QRhiCommandBuffer::setScissor() 및 QRhiViewport도 참조하십시오 .

멤버 함수 문서

[constexpr noexcept default] 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)

가위(scissor)의 위치와 크기를 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 `를 반환합니다.

© 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.