@zeplin/extension-model
    Preparing search index...

    Class Gradient

    An interface to represent shadow of a Layer.

    Index

    Constructors

    Properties

    angle?: number

    The gradient line's angle of direction.

    aspectRatio?: number

    Aspect ratio of the gradient.

    colorStops: ColorStop[]

    Colorstops of the gradient.

    from: Point

    Starting point of the gradient

    scale?: number

    Scale of the gradient.

    to: Point

    Ending point of the gradient

    Type of the shadow. It can be one of "linear", "radial", and "angular".

    Accessors

    • get ALLOWED_FIELDS(): string[]

      Returns string[]

    Methods

    • Creates a Gradient instance from a JSON string

      Parameters

      • json: string

        JSON string representing a gradient

      Returns Gradient

      A new Gradient instance