QConicalGradient Class
QConicalGradient 클래스는 QBrush 와 함께 원뿔형 그라데이션 브러시를 지정하는 데 사용됩니다. 더 보기...
Header: | #include <QConicalGradient> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
상속합니다: | QGradient |
- 상속된 멤버를 포함한 모든 멤버 목록
- QConicalGradient는 페인팅 클래스의 일부입니다.
공용 함수
QConicalGradient() | |
QConicalGradient(const QPointF ¢er, qreal angle) | |
QConicalGradient(qreal cx, qreal cy, qreal angle) | |
qreal | angle() const |
QPointF | center() const |
void | setAngle(qreal angle) |
void | setCenter(const QPointF ¢er) |
void | setCenter(qreal x, qreal y) |
자세한 설명
원추형 그라디언트는 중심점을 중심으로 시계 반대 방향으로 색을 보간합니다.
그라디언트의 색은 QGradientStop 유형의 정지점, 즉 위치와 색을 사용하여 정의됩니다. QGradient::setColorAt () 또는 QGradient::setStops() 함수를 사용하여 정지점을 정의합니다. 그라데이션의 전체 정지점 집합은 그라데이션 영역이 어떻게 채워져야 하는지를 설명합니다. 정지 지점을 지정하지 않으면 0에서 검은색, 1에서 흰색의 그라데이션이 사용됩니다.
QGradient 에서 상속된 함수 외에도 QConicalGradient 클래스는 그라데이션의 시작 각도와 중심을 반환하는 angle() 및 center() 함수를 제공합니다.
setSpread() 함수는 원뿔형 그라데이션에는 효과가 없습니다. 그 이유는 원뿔형 그라데이션은 정의상 닫혀 있기 때문입니다. 즉, 원뿔형 그라데이션은 0~360도까지 전체 원을 채우는 반면 방사형 또는 선형 그라데이션의 경계는 각각 반경 또는 최종 정지점을 통해 지정할 수 있기 때문입니다.
QLinearGradient, QRadialGradient, 그라데이션 예시를참조하세요 .
멤버 함수 문서
QConicalGradient::QConicalGradient()
각도 0에서 보간을 시작하여 중심이 (0, 0)인 원뿔을 만듭니다.
QGradient::setColorAt(), setCenter() 및 setAngle()도 참조하세요 .
QConicalGradient::QConicalGradient(const QPointF ¢er, qreal angle)
주어진 angle 에서 보간을 시작하여 주어진 center 으로 원뿔형 그라데이션을 구성합니다. angle 은 0에서 360 사이의 각도로 지정해야 합니다.
QGradient::setColorAt() 및 QGradient::setStops()도 참조하세요 .
QConicalGradient::QConicalGradient(qreal cx, qreal cy, qreal angle)
지정된 중심(cx, cy)을 가진 원뿔형 그라데이션을 생성하고 지정된 angle 에서 보간을 시작합니다. 각도는 0에서 360 사이의 도 단위로 지정해야 합니다.
QGradient::setColorAt() 및 QGradient::setStops()도 참조하세요 .
qreal QConicalGradient::angle() const
원뿔 그라데이션의 시작 각도를 논리 좌표로 반환합니다.
QPointF QConicalGradient::center() const
원뿔 그라데이션의 중심을 논리적 좌표로 반환합니다.
setCenter() 및 stops()도 참조하세요 .
void QConicalGradient::setAngle(qreal angle)
angle 을 이 원뿔 그라데이션의 시작 각도로 설정합니다(논리적 좌표).
angle()도 참조하세요 .
void QConicalGradient::setCenter(const QPointF ¢er)
이 원뿔 그라데이션의 중심을 논리적 좌표로 center 로 설정합니다.
center()도 참조하세요 .
void QConicalGradient::setCenter(qreal x, qreal y)
이 함수는 과부하된 함수입니다.
이 원뿔 그라데이션의 중심을 논리적 좌표로 (x, y)로 설정합니다.
center()도 참조하세요 .
© 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.