NChartLinearGradientBrush Class Reference

Inherits from NChartGradientBrush : NChartBrush : NSObject
Declared in NChartLinearGradientBrush.h

Overview

The NChartLinearGradientBrush class provides a brush that fills the area with a linear gradient.

+ linearGradientBrushFromColor:toColor:

Create linear gradient brush with given colors. This is a convenient equivalent to creating stops, arraying them and then setting the array to the new instance of the linear gradient brush.

+ (NChartLinearGradientBrush *)linearGradientBrushFromColor:(NSColor *)color1 toColor:(NSColor *)color2

Parameters

color1
  • first color of gradient.
color2
  • second color of gradient.

Return Value

a new instance of the linear gradient brush.

Declared In

NChartLinearGradientBrush.h

– initWithFromColor:toColor:

Init linear gradient brush with given colors. This is a convenient equivalent to creating stops, arraying them and then setting the array to the new instance of the linear gradient brush.

- (id)initWithFromColor:(NSColor *)color1 toColor:(NSColor *)color2

Parameters

color1
  • first color of gradient.
color2
  • second color of gradient.

Return Value

initialized instance of the linear gradient brush.

Declared In

NChartLinearGradientBrush.h

  startPoint

Starting point of the gradient. It is relative to the area, its value should be in (0..1; 0..1). (0; 0) is the bottom left corner of the area, (1; 1) is the top right corner.

@property (nonatomic, assign) CGPoint startPoint

Declared In

NChartLinearGradientBrush.h

  endPoint

Ending point of the gradient. It is relative to area, its value should be in (0..1; 0..1). (0; 0) is the bottom left corner of the area, (1; 1) is the top right corner.

@property (nonatomic, assign) CGPoint endPoint

Declared In

NChartLinearGradientBrush.h