docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GradientFill

    Fills a shape with a gradient.

    Inheritance
    object
    GradientFill
    Implements
    IFill
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.VectorGraphics
    Assembly: Unity.VectorGraphics.dll
    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

    Opacity

    The opacity of the fill.

    Declaration
    public float Opacity { get; set; }
    Property Value
    Type Description
    float

    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

    Implements

    IFill
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)