이 페이지에서

QCanvasBrush Class

QCanvasBrush는 모든 QCanvasPainter 채우기/획 브러시의 기본 클래스입니다. 더 보기...

헤더: #include <QCanvasBrush>
CMake: find_package(Qt6 REQUIRED COMPONENTS CanvasPainter)
target_link_libraries(mytarget PRIVATE Qt6::CanvasPainter)
이후 Qt 6.11
에 의해 상속됨:

QCanvasBoxShadow, QCanvasCustomBrush, QCanvasGradient, QCanvasGridPattern, 그리고 QCanvasImagePattern

상태: 기술 미리보기

공용 유형

enum class BrushType { Invalid, LinearGradient, RadialGradient, ConicalGradient, BoxGradient, …, Custom }

공용 함수

QCanvasBrush()
QCanvasBrush(QCanvasImage &&other)
QCanvasBrush(const QCanvasBrush &brush)
void swap(QCanvasBrush &other)
QCanvasBrush::BrushType type() const
QCanvasBrush &operator=(QCanvasBrush &&other)
QCanvasBrush &operator=(const QCanvasBrush &brush)

상세 설명

QCanvasBrush는 QCanvasPainter::fill() 및 QCanvasPainter::stroke()에 사용되는 모든 스타일의 베이스 클래스입니다.

멤버 유형 문서

enum class QCanvasBrush::BrushType

브러시 유형을 지정합니다.

Constant설명
QCanvasBrush::BrushType::Invalid0- 빈 브러시.
QCanvasBrush::BrushType::LinearGradient1- 시작점과 끝점 사이의 색상을 보간합니다 (QCanvasLinearGradient).
QCanvasBrush::BrushType::RadialGradient2- 초점과 이를 둘러싼 원의 끝점 사이의 색을 보간합니다 (QCanvasRadialGradient).
QCanvasBrush::BrushType::ConicalGradient3- 중심점 주위에 색을 보간합니다 (QCanvasConicalGradient).
QCanvasBrush::BrushType::BoxGradient4- 둥근 직사각형의 색을 보간합니다 (QCanvasBoxGradient).
QCanvasBrush::BrushType::BoxShadow5- 부드러운 둥근 직사각형 그림자를 만듭니다 (QCanvasBoxShadow).
QCanvasBrush::BrushType::ImagePattern6- 지정된 이미지와 반복을 사용하여 패턴을 만듭니다 (QCanvasImagePattern).
QCanvasBrush::BrushType::GridPattern7- 지정된 그리드를 사용하여 패턴을 만듭니다 (QCanvasGridPattern).
QCanvasBrush::BrushType::Custom1000- 사용자 지정 셰이더 브러시를 만듭니다 (QCanvasCustomBrush).

type()도 참조하십시오 .

멤버 함수 문서

QCanvasBrush::QCanvasBrush()

유효하지 않은 브러시를 생성합니다.

[noexcept default] QCanvasBrush::QCanvasBrush(QCanvasImage &&other)

이동 - other 에서 새 QCanvasBrush를 생성합니다.

QCanvasBrush::QCanvasBrush(const QCanvasBrush &brush)

주어진 brush 의 복사본인 브러시를 생성합니다.

[noexcept] void QCanvasBrush::swap(QCanvasBrush &other)

이 브러시를 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.

QCanvasBrush::BrushType QCanvasBrush::type() const

브러시 유형을 반환합니다.

[noexcept] QCanvasBrush &QCanvasBrush::operator=(QCanvasBrush &&other)

이동-이 other 인스턴스를 QCanvasBrush 인스턴스에 할당합니다.

QCanvasBrush &QCanvasBrush::operator=(const QCanvasBrush &brush)

주어진 brush 을 이 브러시에 할당하고 이 브러시에 대한 참조를 반환합니다.

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