이 페이지에서

RadialGradient QML Type

방사형 그라데이션. 더 보기...

Import Statement: import QtQuick.Shapes 1.12
Inherits:

ShapeGradient

속성

상세 설명

방사형 그라디언트는 도형 항목에서 초점 원과 중심 원 사이의 색상을 보간합니다. 두 원으로 정의된 원뿔 영역 밖에 있는 지점은 투명하게 표시됩니다.

끝점 바깥쪽에서는 스프레드 유형에 따라 그라디언트가 패딩, 반사 또는 반복 처리됩니다.

다음은 간단한 방사형 그라데이션의 예시입니다. 여기서는 지정된 점과 반지름으로 정의된 원의 끝점 사이에서 색상이 보간됩니다:

fillGradient: RadialGradient {
    centerX: 50; centerY: 50
    centerRadius: 100
    focalX: centerX; focalY: centerY
    GradientStop { position: 0; color: "blue" }
    GradientStop { position: 0.2; color: "green" }
    GradientStop { position: 0.4; color: "red" }
    GradientStop { position: 0.6; color: "yellow" }
    GradientStop { position: 1; color: "cyan" }
}

중앙은 흰색에서 가장자리는 시안색으로 변하는 방사형 그라데이션이 적용된 타원

별도의 초점 원을 지정하는 확장 방사형 그라디언트도 지원됩니다.

참고: RadialGradient는 Shape 항목과 함께 사용될 때만 지원됩니다. Rectangle 와는 호환되지 않는데, 이는 가 Gradient 만 지원하기 때문입니다.

QRadialGradient도 참조하십시오 .

속성 설명서

centerRadius : real

focalRadius : real

이 속성들은 중심과 초점 반경을 정의합니다. 단순한 방사형 그라데이션의 경우, ` focalRadius `은 ` 0 `(기본값)으로 설정해야 합니다.

centerX : real

centerY : real

focalX : real

focalY : real

이 속성들은 중심과 초점 위치를 정의합니다. 간단한 방사형 그라데이션을 지정하려면, ` focalX `과 ` focalY `을 각각 ` centerX `과 ` centerY` 값으로 설정하십시오.

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