SolidColorBrush

open class SolidColorBrush : Brush

Represents a brush with solid color. This class inherits Brush.

  • Initializes a new SolidColorBrush with a default color.

    Declaration

    Swift

    public override init()

    Return Value

    The newly created SolidColorBrush object.

  • Initializes a new SolidColorBrush with the specified color.

    Declaration

    Swift

    public init(color: Color)

    Parameters

    color

    The initial color of the solid brush.

    Return Value

    The newly created SolidColorBrush object.

  • Gets the color representation of this LinearGradientBrush.

    Declaration

    Swift

    open override func toColor() -> Color

    Return Value

    A color that represents this LinearGradientBrush.

  • Undocumented

    Declaration

    Swift

    public override func hash(into hasher: inout Hasher)
  • Checks if this SolidColorBrush is equal to the specified brush.

    Declaration

    Swift

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

    Return Value

    true if the brushes are equal; otherwise false.

  • Specifies the color of this SolidColorBrush.

    Declaration

    Swift

    open var color: Color