boxgradient2d QML Value Type
QCanvasBoxGradient 에 대한 boxgradient2d 유형 매칭을 제공합니다. 더 보기...
| Import Statement: | import QtCanvas2D |
| Since: | Qt 6.12 |
| Status: | Technology preview |
이 유형은 기술 미리보기 단계에 있으며 변경될 수 있습니다.
메서드
- void addColorStop(real offset, string color)
- real feather()
- real radius()
- rect rect()
- void setFeather(real feather)
- void setRadius(real radius)
- void setRect(x, y, width, height)
- void setRect(rect)
상세 설명
이 값 유형은 ` QtCanvas2D ` 임포트에 의해 제공됩니다.
QCanvasBoxGradient도 참조하십시오 .
메서드 문서
void addColorStop(real offset, string color)
지정된 color 을 가진 컬러 스톱을, 지정된 offset 위치의 그라데이션에 추가합니다. 0.0은 그라데이션 한쪽 끝의 오프셋을, 1.0은 다른 쪽 끝의 오프셋을 나타냅니다.
예시:
const gradient = ctx.createBoxGradient(50, 50, 100, 100, 20, 10);
gradient.addColorStop(0.0, Qt.rgba(1, 0, 0, 1));
gradient.addColorStop(0.5, "#ff8040");
gradient.addColorStop(1.0, "red");real feather()
박스 그라데이션의 깃털을 반환합니다.
setFeather()도 참조하십시오 .
real radius()
박스 그라데이션의 반지름을 반환합니다.
setRadius()도 참조하십시오 .
rect rect()
박스 그라데이션의 직사각형 면적을 반환합니다.
setRect()도 참조하십시오 .
void setFeather(real feather)
박스 그라데이션의 페더를 feather 로 설정합니다.
feather()도 참조하십시오 .
void setRadius(real radius)
박스 그라디언트의 반지름을 ` radius`로 설정합니다. 최대 반지름은 ` rect()`의 너비나 높이 중 더 작은 값의 절반입니다.
radius()도 참조하십시오 .
void setRect(x, y, width, height)
박스 그라디언트의 직사각형을 위치( x, y)와 크기( width, height)로 설정합니다.
rect()도 참조하십시오 .
void setRect(rect)
박스 그라데이션의 직사각형을 rect 로 설정합니다.
이 함수는 오버로드된 함수입니다.
© 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.