RadialGradient QML Type

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

Import Statement: import QtQuick.Shapes 1.8
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" }
}

별도의 초점 원이 지정된 확장 방사형 그라데이션도 지원됩니다.

참고: 방사형 그라디언트는 도형 항목과 함께 사용할 때만 지원됩니다. Gradient 만 지원하므로 Rectangle 와는 호환되지 않습니다.

QRadialGradient참조하세요 .

속성 문서

centerX : real

centerY : real

focalX : real

focalY : real

이러한 속성은 중심과 초점을 정의합니다. 간단한 방사형 그라데이션을 지정하려면 focalXfocalY 을 각각 centerXcenterY 의 값으로 설정합니다.


centerRadius : real

focalRadius : real

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


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