Inherits from NSObject
Declared in TKShape.h

Overview

Represents a drawable shape.

Properties

insets

Returns the shape insets neeeded

@property (nonatomic, readonly) UIEdgeInsets insets

Declared In

TKShape.h

size

The size of the shape.

@property (nonatomic, assign) CGSize size

Declared In

TKShape.h

Instance Methods

drawInContext:withCenter:drawings:

Draws the shape in a context.

- (void)drawInContext:(CGContextRef __nonnull)context withCenter:(CGPoint)center drawings:(NSArray *__nonnull)drawings

Parameters

context

The context to draw in.

center

The center of the shape.

drawings

The array of TKDrawing shape and fills.

Declared In

TKShape.h

drawInContext:withCenter:drawings:scale:

Draws the shape in a context.

- (void)drawInContext:(CGContextRef __nonnull)context withCenter:(CGPoint)center drawings:(NSArray *__nonnull)drawings scale:(CGFloat)scale

Parameters

context

The context to draw in.

center

The center of the shape.

drawings

The array of TKDrawing shape and fills.

scale

The shape scale (1.0f = draw with shape’s size).

Declared In

TKShape.h

initWithSize:

Creates a shape with specified size.

- (instancetype __nonnull)initWithSize:(CGSize)size

Parameters

size

Specifies the size in pixels.

Declared In

TKShape.h