iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

SCIGradientBrushStyle

@interface SCIGradientBrushStyle : SCIBrushStyle

An abstract base class that describes a gradient, composed of gradient stops. Classes that inherit from SCIGradientBrushStyle describe different ways of interpreting gradient stops.

  • Gets the SCIUnsignedIntegerValues with gradient colors.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCIUnsignedIntegerValues *_Nonnull colors;

    Swift

    var colors: SCIUnsignedIntegerValues { get }
  • Gets the SCIFloatValues with gradient stops.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCIFloatValues *_Nonnull stops;

    Swift

    var stops: SCIFloatValues { get }
  • Gets the CGGradientRef created from this SCIGradientBrushStyle instance.

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGGradientRef _Nonnull cgGradient;

    Swift

    var cgGradient: CGGradient { get }
  • Creates a new instance of SCIGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithColorValues:
                                (nonnull SCIUnsignedIntegerValues *)colors
                                     stopValues:(nonnull SCIFloatValues *)stops;

    Swift

    init(colorValues colors: SCIUnsignedIntegerValues, stop stops: SCIFloatValues)

    Parameters

    colors

    The SCIUnsignedIntegerValues with gradient colors.

    stops

    The SCIFloatValues with gradient stops.

  • Returns a Boolean value that indicates whether the receiver and a given object are equal.

    Declaration

    Objective-C

    - (BOOL)isEqualToBrushStyle:(nullable SCIGradientBrushStyle *)brushStyle;

    Swift

    func isEqual(to brushStyle: SCIGradientBrushStyle?) -> Bool

    Parameters

    brushStyle

    The brush style to be compared to the receiver. May be nil, in which case this method returns NO.

    Return Value

    YES if the receiver and anObject are equal, otherwise - NO.