conicalgradient2d QML Value Type
QCanvasConicalGradient 에 대한 conicalgradient2d 유형 매칭을 제공합니다. 더 보기...
| Import Statement: | import QtCanvas2D |
| Since: | Qt 6.12 |
| Status: | Technology preview |
이 유형은 기술 미리보기 단계에 있으며 변경될 수 있습니다.
메서드
- void addColorStop(real offset, string color)
- point centerPosition()
- void setCenterPosition(real x, real y)
- void setCenterPosition(point center)
- void setStartAngle(real angle)
- real startAngle()
상세 설명
이 값 유형은 ` QtCanvas2D ` 임포트에서 제공됩니다.
QCanvasConicalGradient도 참조하십시오 .
메서드 문서
void addColorStop(real offset, string color)
지정된 color 값을 가진 색상 스톱을, 지정된 offset 위치의 그라데이션에 추가합니다. 0.0은 그라데이션 한쪽 끝의 오프셋을, 1.0은 다른 쪽 끝의 오프셋을 나타냅니다.
예:
const gradient = ctx.createConicalGradient(100, 100, Math.PI / 2);
gradient.addColorStop(0.0, Qt.rgba(1, 0, 0, 1));
gradient.addColorStop(0.5, "#ff8040");
gradient.addColorStop(1.0, "red");point centerPosition()
원뿔형 그라디언트의 중심점을 반환합니다.
setCenterPosition()도 참조하십시오 .
void setCenterPosition(real x, real y)
원뿔형 그라디언트의 중심점을 ( x, y)로 설정합니다.
centerPosition()도 참조하십시오 .
void setCenterPosition(point center)
원뿔형 그라데이션의 중심점을 center 로 설정합니다.
이 함수는 오버로드된 함수입니다.
void setStartAngle(real angle)
원뿔형 그라데이션의 시작 각도를 라디안 단위로 angle 로 설정합니다. 이 각도는 중심에서 수평으로 오른쪽으로 뻗은 선을 기점으로 시계 방향으로 진행됩니다.
startAngle()도 참조하십시오 .
real startAngle()
원뿔형 그라디언트의 시작 각도를 라디안 단위로 반환합니다.
setStartAngle()도 참조하십시오 .
© 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.