API  0.9.10
CPBezierPath Class Reference

#import <CPBezierPath.h>

+ Inheritance diagram for CPBezierPath:

Instance Methods

(void) - addClip
 
(void) - appendBezierPath:
 
(void) - appendBezierPathWithArcFromPoint:toPoint:radius:
 
(void) - appendBezierPathWithOvalInRect:
 
(void) - appendBezierPathWithPoints:count:
 
(void) - appendBezierPathWithRect:
 
(void) - appendBezierPathWithRoundedRect:xRadius:yRadius:
 
(CGRect) - bounds
 
(void) - closePath
 
(CGRect) - controlPointBounds
 
(CGPoint) - currentPoint
 
(void) - curveToPoint:controlPoint1:controlPoint2:
 
(unsigned) - elementCount
 
(void) - fill
 
(void) - getLineDash:count:phase:
 
(void) - getLineDash:phase:
 
(id) - init
 
(BOOL) - isEmpty
 
(void) - lineToPoint:
 
(float) - lineWidth
 
(void) - moveToPoint:
 
(void) - removeAllPoints
 
(void) - setClip
 
(void) - setLineDash:count:phase:
 
(void) - setLineDash:phase:
 
(void) - setLineWidth:
 
(void) - stroke
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPBezierPath+ bezierPath
 
(CPBezierPath+ bezierPathWithOvalInRect:
 
(CPBezierPath+ bezierPathWithRect:
 
(CPBezierPath+ bezierPathWithRoundedRect:xRadius:yRadius:
 
(float) + defaultLineWidth
 
(void) + fillRect:
 
(void) + setDefaultLineWidth:
 
(void) + strokeLineFromPoint:toPoint:
 
(void) + strokeRect:
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

A CPBezierPath allows you to create paths for drawing to the screen using a simpler API than CoreGraphics. Paths can form any shape, including regular polygons like squares and triangles; circles, arcs; or complex line segments.

A path can be stroked and filled using the relevant method. The currently active fill and stroke color will be used, which can be set by calling setFill: and setStroke: on any CPColor object (or set: for both).

Definition at line 2 of file CPBezierPath.h.

Method Documentation

◆ addClip()

- (void) addClip
implementation

Definition at line 360 of file CPBezierPath.j.

◆ appendBezierPath:()

- (void) appendBezierPath: (CPBezierPath other
implementation

Append the contents of a CPBezierPath object.

Definition at line 347 of file CPBezierPath.j.

◆ appendBezierPathWithArcFromPoint:toPoint:radius:()

- (void) appendBezierPathWithArcFromPoint: (CGPoint)  fromPoint
toPoint: (CGPoint)  toPoint
radius: (float)  radius 
implementation

Definition at line 339 of file CPBezierPath.j.

◆ appendBezierPathWithOvalInRect:()

- (void) appendBezierPathWithOvalInRect: (CGRect)  rect
implementation

Append an oval path; oval is drawn within the rectangular path.

Definition at line 326 of file CPBezierPath.j.

◆ appendBezierPathWithPoints:count:()

- (void) appendBezierPathWithPoints: (CPArray)  points
count: (unsigned)  count 
implementation

Append a series of line segments.

Definition at line 310 of file CPBezierPath.j.

◆ appendBezierPathWithRect:()

- (void) appendBezierPathWithRect: (CGRect)  rect
implementation

Append a rectangular path.

Definition at line 318 of file CPBezierPath.j.

◆ appendBezierPathWithRoundedRect:xRadius:yRadius:()

- (void) appendBezierPathWithRoundedRect: (CGRect)  rect
xRadius: (float)  xRadius
yRadius: (float)  yRadius 
implementation

Append a rounded rectangular path.

Definition at line 334 of file CPBezierPath.j.

◆ bezierPath()

+ (CPBezierPath) bezierPath
implementation

Create a new CPBezierPath object.

Definition at line 55 of file CPBezierPath.j.

◆ bezierPathWithOvalInRect:()

+ (CPBezierPath) bezierPathWithOvalInRect: (CGRect)  aRect
implementation

Create a new CPBezierPath object initialized with an oval path drawn within a rectangular path.

Definition at line 63 of file CPBezierPath.j.

◆ bezierPathWithRect:()

+ (CPBezierPath) bezierPathWithRect: (CGRect)  aRect
implementation

Create a new CPBezierPath object initialized with a rectangular path.

Definition at line 75 of file CPBezierPath.j.

◆ bezierPathWithRoundedRect:xRadius:yRadius:()

+ (CPBezierPath) bezierPathWithRoundedRect: (CGRect)  aRect
xRadius: (float)  xRadius
yRadius: (float)  yRadius 
implementation

Definition at line 84 of file CPBezierPath.j.

◆ bounds()

- (CGRect) bounds
implementation

Definition at line 178 of file CPBezierPath.j.

◆ closePath()

- (void) closePath
implementation

Create a line segment between the first and last points in the subpath, closing it.

Definition at line 194 of file CPBezierPath.j.

◆ controlPointBounds()

- (CGRect) controlPointBounds
implementation

Definition at line 186 of file CPBezierPath.j.

◆ currentPoint()

- (CGPoint) currentPoint
implementation

Get the current point.

Definition at line 302 of file CPBezierPath.j.

◆ curveToPoint:controlPoint1:controlPoint2:()

- (void) curveToPoint: (CGPoint)  endPoint
controlPoint1: (CGPoint)  controlPoint1
controlPoint2: (CGPoint)  controlPoint2 
implementation

Add a cubic Bezier curve to the path.

Definition at line 173 of file CPBezierPath.j.

◆ defaultLineWidth()

+ (float) defaultLineWidth
implementation

Get default line width.

Definition at line 96 of file CPBezierPath.j.

◆ elementCount()

- (unsigned) elementCount
implementation

Get the total number of elements.

Definition at line 286 of file CPBezierPath.j.

◆ fill()

- (void) fill
implementation

Fill the path with the current fill color.

Definition at line 216 of file CPBezierPath.j.

◆ fillRect:()

+ (void) fillRect: (CGRect)  aRect
implementation

Fill rectangular path with current fill color.

Definition at line 112 of file CPBezierPath.j.

◆ getLineDash:count:phase:()

- (void) getLineDash: (CPArrayRef)  patternRef
count: (NSInteger)  count
phase: (CGFloatRef)  phaseRef 
implementation

Cocoa compatibility.

Definition at line 231 of file CPBezierPath.j.

◆ getLineDash:phase:()

- (void) getLineDash: (CPArrayRef)  patternRef
phase: (CGFloatRef)  phaseRef 
implementation

Retrieve the line dash pattern and phase and write them into the provided references.

Definition at line 239 of file CPBezierPath.j.

◆ init()

- (id) init
implementation

Create a new CPBezierPath object using the default line width.

Reimplemented from CPObject.

Definition at line 141 of file CPBezierPath.j.

◆ isEmpty()

- (BOOL) isEmpty
implementation

Check if receiver is empty, returns appropriate Boolean value.

Definition at line 294 of file CPBezierPath.j.

◆ lineToPoint:()

- (void) lineToPoint: (CGPoint)  point
implementation

Append a straight line to the path.

Definition at line 165 of file CPBezierPath.j.

◆ lineWidth()

- (float) lineWidth
implementation

Get the line width.

Definition at line 270 of file CPBezierPath.j.

◆ moveToPoint:()

- (void) moveToPoint: (CGPoint)  point
implementation

Moves the current point to another location.

Definition at line 157 of file CPBezierPath.j.

◆ removeAllPoints()

- (void) removeAllPoints
implementation

Remove all path elements; clears path.

Definition at line 355 of file CPBezierPath.j.

◆ setClip()

- (void) setClip
implementation

Definition at line 368 of file CPBezierPath.j.

◆ setDefaultLineWidth:()

+ (void) setDefaultLineWidth: (float)  width
implementation

Set default line width.

Definition at line 104 of file CPBezierPath.j.

◆ setLineDash:count:phase:()

- (void) setLineDash: (CPArray)  aPattern
count: (NSInteger)  count
phase: (CGFloat)  aPhase 
implementation

Cocoa compatibility.

Definition at line 250 of file CPBezierPath.j.

◆ setLineDash:phase:()

- (void) setLineDash: (CPArray)  aPattern
phase: (CGFloat)  aPhase 
implementation

Set stroke line dash pattern.

Parameters
aPatternan array of stroke-skip lengths such as [2, 2, 4, 4]
aPhaseamount of shift for the starting position of the first stroke

Definition at line 261 of file CPBezierPath.j.

◆ setLineWidth:()

- (void) setLineWidth: (float)  lineWidth
implementation

Set the line width.

Definition at line 278 of file CPBezierPath.j.

◆ stroke()

- (void) stroke
implementation

Draw a line along the path with the current stroke color and default drawing attributes.

Definition at line 202 of file CPBezierPath.j.

◆ strokeLineFromPoint:toPoint:()

+ (void) strokeLineFromPoint: (CGPoint)  point1
toPoint: (CGPoint)  point2 
implementation

Using the current stroke color and default drawing attributes, strokes a line between two points.

Definition at line 128 of file CPBezierPath.j.

◆ strokeRect:()

+ (void) strokeRect: (CGRect)  aRect
implementation

Using the current stroke color and default drawing attributes, strokes a counterclockwise path beginning at the rectangle's origin.

Definition at line 120 of file CPBezierPath.j.


The documentation for this class was generated from the following files: