이 페이지에서

QSGSimpleRectNode Class

QSGSimpleRectNode 클래스는 씬그래프를 사용하여 채움이 적용된 사각형을 그리는 데 편의를 제공하는 클래스입니다. 더 보기...

헤더: #include <QSGSimpleRectNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
상속: QSGGeometryNode

공개 함수

QSGSimpleRectNode()
QSGSimpleRectNode(const QRectF &rect, const QColor &color)
QColor color() const
QRectF rect() const
void setColor(const QColor &color)
void setRect(const QRectF &rect)
void setRect(qreal x, qreal y, qreal w, qreal h)

상세 설명

경고: 이 유틸리티 클래스는 Qt Quick 시네그래프의 기본 또는 소프트웨어 백엔드와 함께 실행될 때만 작동합니다. 대안으로, QQuickWindow::createRectangleNode()을 통해 QSGRectangleNode 를 사용하는 것이 좋습니다. 그러나 이 독립형 클래스는 서브클래싱을 통해 사용되며, 애플리케이션에서 특별한 시네그래프 백엔드가 관여되지 않을 것임을 알고 있는 경우에는 여전히 유용합니다.

멤버 함수 문서

QSGSimpleRectNode::QSGSimpleRectNode()

빈 사각형과 흰색을 가진 QSGSimpleRectNode 인스턴스를 생성합니다.

QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color)

rect 를 가로지르며 색상이 color 인 QSGSimpleRectNode 인스턴스를 생성합니다.

QColor QSGSimpleRectNode::color() const

이 사각형의 색상을 반환합니다.

setColor()도 참조하십시오 .

QRectF QSGSimpleRectNode::rect() const

이 rect 노드가 덮고 있는 사각형을 반환합니다.

setRect()도 참조하십시오 .

void QSGSimpleRectNode::setColor(const QColor &color)

이 사각형의 색상을 color 로 설정합니다. 기본 색상은 흰색입니다.

color()도 참조하십시오 .

void QSGSimpleRectNode::setRect(const QRectF &rect)

이 rect 노드의 사각형을 rect 로 설정합니다.

rect()도 참조하십시오 .

void QSGSimpleRectNode::setRect(qreal x, qreal y, qreal w, qreal h)

이 rect 노드의 사각형이 (x, y)에서 시작하고, 너비는 w, 높이는 h 이 되도록 설정합니다.

이 함수는 오버로드된 함수입니다.

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