RadialGradient QML Type

放射状のグラデーション。詳細...

Import Statement: import QtQuick.Shapes 1.8
Inherits:

ShapeGradient

プロパティ

詳細説明

放射状グラデーションは、Shapeアイテムの焦点円と中心円の間で色を補間します。2つの円で定義された円錐の外側の点は透明になります。

端点の外側では、スプレッドのタイプに応じて、グラデーションは水増しされるか、反射されるか、繰り返されます。

下は単純な放射状グラデーションの例です。ここでは、半径で指定された円上の指定された点と端点の間で色が補間されます:

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アイテムとの組み合わせでのみサポートされます。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.