Class GradientFill | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class GradientFill

    Fills a shape with a gradient.

    Inheritance
    System.Object
    GradientFill
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Unity.VectorGraphics
    Syntax
    public class GradientFill : IFill
    Remarks

    Size of the fill is always assumed to cover the entire element's bounding box. Radial fills are centered in the element's bounding box. Its radii are half the bounding box dimensions in each direction. Linear fills start from the left edge to the right edge of the element's bounding box.

    Properties

    Addressing

    The adressing mode (wrap, clamp or mirror) of this fill.

    Declaration
    public AddressMode Addressing { get; set; }
    Property Value
    Type Description
    AddressMode

    Mode

    The filling method (non-zero or even-odd) of the fill.

    Declaration
    public FillMode Mode { get; set; }
    Property Value
    Type Description
    FillMode
    Implements
    IFill.Mode

    Opacity

    The opacity of the fill.

    Declaration
    public float Opacity { get; set; }
    Property Value
    Type Description
    System.Single
    Implements
    IFill.Opacity

    RadialFocus

    A position within the unit circle (-1,1) where 0 falls in the middle of the fill.

    Declaration
    public Vector2 RadialFocus { get; set; }
    Property Value
    Type Description
    Vector2

    Stops

    An array of stops defining the gradient colors.

    Declaration
    public GradientStop[] Stops { get; set; }
    Property Value
    Type Description
    GradientStop[]

    Type

    The fill type (linear or gradient).

    Declaration
    public GradientFillType Type { get; set; }
    Property Value
    Type Description
    GradientFillType
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023