IGBrush Class Reference

Inherits from NSObject
Declared in Core.h

Overview

IGBrush is a solid color brush used by the chart view. This brush can only have one color.

Other Methods

  red

@property (nonatomic, readonly) CGFloat red

  green

@property (nonatomic, readonly) CGFloat green

  blue

@property (nonatomic, readonly) CGFloat blue

  alpha

@property (nonatomic, readonly) CGFloat alpha

Initializing IGBrush

– initWithR:andG:andB:andA:

Creates a new brush with red, green, blue and alpha components.

- (instancetype)initWithR:(CGFloat)r andG:(CGFloat)g andB:(CGFloat)b andA:(CGFloat)a

Parameters

r

Red component of the brush. This value should be between 0 and 1.

g

Green component of the brush. This value should be between 0 and 1.

b

Blue component of the brush. This value should be between 0 and 1.

a

Alpha component of the brush. This value should be between 0 and 1.

Return Value

Returns an initialized instance of IGBrush.

Declared In

Core.h

– initWithColor:

Creates a new brush from UIColor.

- (instancetype)initWithColor:(UIColor *)color

Parameters

color

UIColor that will be used to create the brush.

Return Value

Returns an initialized instance of IGBrush.

Declared In

Core.h

– isEqualToBrush:

Compares two brushes and returns YES if they represent the same color; otherwise, returns NO.

- (BOOL)isEqualToBrush:(IGBrush *)brush

Declared In

Core.h

– isEqualToColor:

Creates a brush from a given color and uses the result to compare two brushes. Returns YES is equal. Otherwise, returns NO.

- (BOOL)isEqualToColor:(UIColor *)color

Declared In

Core.h

  UIColor

Returns the current brush expressed as UIColor.

@property (NS_NONATOMIC_IOSONLY, getter=getUIColor, readonly, copy) *UIColor

Declared In

Core.h