LinearGradientBrush

open class LinearGradientBrush : Brush

Represents a LinearGradientBrush object. This class inherits Brush.

  • Undocumented

    Declaration

    Swift

    public init(color1: Color, color2: Color, angle: Double)
  • Declaration

    Swift

    public override init()
  • Undocumented

    Declaration

    Swift

    public override func hash(into hasher: inout Hasher)
  • Compares if this LinearGradientBrush is equal to the specified Brush.

    Declaration

    Swift

    open override func equalsTo(_ brush: Brush) -> Bool

    Parameters

    brush

    The Brush to compare this LinearGradientBrush to.

    Return Value

    true if the brushes are equal; otherwise false.

  • Gets the color representation of this LinearGradientBrush.

    Declaration

    Swift

    open override func toColor() -> Color

    Return Value

    A color that represents this LinearGradientBrush.

  • Specifies the positions of the linear gradient.

    Declaration

    Swift

    open var positions: [Double]
  • Specifies the colors of the linear gradient.

    Declaration

    Swift

    open var colors: [Color]
  • Specifies the angle of the linear gradient.

    Declaration

    Swift

    open var angle: Double