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

SCILinearGradientBrushStyle

@interface SCILinearGradientBrushStyle : SCIGradientBrushStyle

Defines brush style which allows to fill shapes with linear gradient.

  • Gets the start point for linear gradient.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGPoint start;

    Swift

    var start: CGPoint { get }
  • end

    Gets the end point for linear gradient.

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGPoint end;

    Swift

    var end: CGPoint { get }
  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStartColor:(nonnull UIColor *)startColor
                                      endColor:(nonnull UIColor *)endColor;

    Swift

    init(start startColor: UIColor, end endColor: UIColor)

    Parameters

    startColor

    The start color of the gradient.

    endColor

    The end color of the gradient.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStart:(CGPoint)start
                                      end:(CGPoint)end
                               startColor:(nonnull UIColor *)startColor
                                 endColor:(nonnull UIColor *)endColor;

    Swift

    init(start: CGPoint, end: CGPoint, start startColor: UIColor, end endColor: UIColor)

    Parameters

    start

    The start point for linear gradient.

    end

    The end point for linear gradient.

    startColor

    The start color of the gradient.

    endColor

    The end color of the gradient.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStartColorCode:(unsigned int)startColor
                                      endColorCode:(unsigned int)endColor;

    Swift

    init(startColorCode startColor: UInt32, endColorCode endColor: UInt32)

    Parameters

    startColor

    The start color code of the gradient.

    endColor

    The end color code of the gradient.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStart:(CGPoint)start
                                      end:(CGPoint)end
                           startColorCode:(unsigned int)startColor
                             endColorCode:(unsigned int)endColor;

    Swift

    init(start: CGPoint, end: CGPoint, startColorCode startColor: UInt32, endColorCode endColor: UInt32)

    Parameters

    start

    The start point for linear gradient.

    end

    The end point for linear gradient.

    startColor

    The start color code of the gradient.

    endColor

    The end color code of the gradient.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithColors:(nonnull unsigned int *)colors
                                     stops:(nonnull float *)stops
                                     count:(int)count;

    Swift

    init(colors: UnsafeMutablePointer<UInt32>, stops: UnsafeMutablePointer<Float>, count: Int32)

    Parameters

    colors

    The array with gradient colors.

    stops

    The array with gradient stops.

    count

    The count of color and stops.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStart:(CGPoint)start
                                      end:(CGPoint)end
                                   colors:(nonnull unsigned int *)colors
                                    stops:(nonnull float *)stops
                                    count:(int)count;

    Swift

    init(start: CGPoint, end: CGPoint, colors: UnsafeMutablePointer<UInt32>, stops: UnsafeMutablePointer<Float>, count: Int32)

    Parameters

    start

    The start point for linear gradient.

    end

    The end point for linear gradient.

    colors

    The array with gradient colors.

    stops

    The array with gradient stops.

    count

    The count of color and stops.

  • Creates a new instance of SCILinearGradientBrushStyle.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithStart:(CGPoint)start
                                      end:(CGPoint)end
                              colorValues:(nonnull SCIUnsignedIntegerValues *)colors
                               stopValues:(nonnull SCIFloatValues *)stops;

    Swift

    init(start: CGPoint, end: CGPoint, colorValues colors: SCIUnsignedIntegerValues, stop stops: SCIFloatValues)

    Parameters

    start

    The start point for linear gradient.

    end

    The end point for linear gradient.

    colors

    The SCIUnsignedIntegerValues with gradient colors.

    stops

    The SCIFloatValues with gradient stops.