QBackingStore Class
QBackingStore 클래스는 QWindow 에 대한 그리기 영역을 제공합니다. 더 보기...
헤더: | #include <QBackingStore> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
공용 함수
QBackingStore(QWindow *window) | |
~QBackingStore() | |
void | beginPaint(const QRegion ®ion) |
void | endPaint() |
void | flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint()) |
QPlatformBackingStore * | handle() const |
bool | hasStaticContents() const |
QPaintDevice * | paintDevice() |
void | resize(const QSize &size) |
bool | scroll(const QRegion &area, int dx, int dy) |
void | setStaticContents(const QRegion ®ion) |
QSize | size() const |
QRegion | staticContents() const |
QWindow * | window() const |
상세 설명
QBackingStore는 QPainter 를 사용하여 QWindow 에 RasterSurface 유형으로 페인트할 수 있게 해줍니다. QWindow 에 렌더링하는 다른 방법은 QOpenGLContext 과 함께 OpenGL을 사용하는 것입니다.
QBackingStore에는 창 콘텐츠의 버퍼링된 표현이 포함되어 있으므로 QPainter 을 사용하여 창 콘텐츠의 하위 영역만 업데이트하는 부분 업데이트를 지원합니다.
OpenGL 가속 없이 QWidget 또는 QGraphicsView UI 스택을 사용하는 추가 오버헤드 없이 QPainter 을 사용하려는 애플리케이션에서 QBackingStore를 사용할 수 있습니다. 사용 방법에 대한 예시는 래스터 창 예제를 참조하십시오.
멤버 함수 문서
[explicit]
QBackingStore::QBackingStore(QWindow *window)
주어진 최상위 레벨 window 에 대한 빈 표면을 생성합니다.
[noexcept]
QBackingStore::~QBackingStore()
이 표면을 파괴합니다.
void QBackingStore::beginPaint(const QRegion ®ion)
주어진 region 에서 백킹 스토어 표면에 페인팅을 시작합니다.
paintDevice()를 사용하여 페인팅하기 전에 이 함수를 호출해야 합니다.
endPaint() 및 paintDevice()도 참조하세요 .
void QBackingStore::endPaint()
페인팅을 종료합니다.
paintDevice()를 사용한 페인팅이 종료된 후에 이 함수를 호출해야 합니다.
beginPaint() 및 paintDevice()도 참조하세요 .
void QBackingStore::flush(const QRegion ®ion, QWindow *window = nullptr, const QPoint &offset = QPoint())
지정된 window 에서 지정된 region 을 화면으로 푸시합니다.
window 은 이 백킹스토어가 나타내는 최상위 창이거나 해당 창의 일시적이지 않은 하위 창이어야 합니다. nullptr
을 전달하면 백킹스토어의 최상위 창을 사용하는 것으로 돌아갑니다.
window 이 자식 창인 경우 region 은 자식 창 좌표에 있어야 하며 offset 은 백킹스토어의 최상위 창에 대한 자식 창의 오프셋이 되어야 합니다.
이 함수는 endPaint()로 페인팅을 종료한 후에 호출해야 합니다.
QPlatformBackingStore *QBackingStore::handle() const
QPlatformBackingStore 구현에 대한 포인터를 반환합니다.
bool QBackingStore::hasStaticContents() const
이 창에 정적 콘텐츠가 있는지 여부를 나타내는 부울을 반환합니다.
QPaintDevice *QBackingStore::paintDevice()
이 서페이스에 대한 페인트 장치를 반환합니다.
경고: 이 장치는 beginPaint() 및 endPaint() 호출 사이에서만 유효합니다. 반환된 값을 캐시해서는 안 됩니다.
void QBackingStore::resize(const QSize &size)
창 표면의 크기를 size 로 설정합니다.
size()도 참조하세요 .
bool QBackingStore::scroll(const QRegion &area, int dx, int dy)
주어진 area dx 픽셀을 오른쪽으로, dy 아래쪽으로 스크롤합니다( dx 및 dy 모두 음수일 수 있음).
해당 영역이 성공적으로 스크롤되면 true
을 반환하고, 그렇지 않으면 false를 반환합니다.
void QBackingStore::setStaticContents(const QRegion ®ion)
region 을 이 창의 정적 콘텐츠로 설정합니다.
staticContents()도 참조하세요 .
QSize QBackingStore::size() const
창 표면의 현재 크기를 반환합니다.
QRegion QBackingStore::staticContents() const
정적 콘텐츠가 있는 창 영역을 나타내는 QRegion 을 반환합니다.
setStaticContents()도 참조하세요 .
QWindow *QBackingStore::window() const
이 서페이스와 연관된 최상위 창에 대한 포인터를 반환합니다.
© 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.