Public Member Functions | |
(void) | - appendBezierPath: [implementation] |
(void) | - appendBezierPathWithOvalInRect: [implementation] |
(void) | - appendBezierPathWithPoints:count: [implementation] |
(void) | - appendBezierPathWithRect: [implementation] |
(void) | - appendBezierPathWithRoundedRect:xRadius:yRadius: [implementation] |
(void) | - closePath [implementation] |
(CGPoint) | - currentPoint [implementation] |
(void) | - curveToPoint:controlPoint1:controlPoint2: [implementation] |
(unsigned) | - elementCount [implementation] |
(void) | - fill [implementation] |
(id) | - init [implementation] |
(BOOL) | - isEmpty [implementation] |
(void) | - lineToPoint: [implementation] |
(float) | - lineWidth [implementation] |
(void) | - moveToPoint: [implementation] |
(void) | - removeAllPoints [implementation] |
(void) | - setLineWidth: [implementation] |
(void) | - stroke [implementation] |
Static Public Member Functions | |
(CPBezierPath) | + bezierPath [implementation] |
(CPBezierPath) | + bezierPathWithOvalInRect: [implementation] |
(CPBezierPath) | + bezierPathWithRect: [implementation] |
(float) | + defaultLineWidth [implementation] |
(void) | + fillRect: [implementation] |
(void) | + setDefaultLineWidth: [implementation] |
(void) | + strokeLineFromPoint:toPoint: [implementation] |
(void) | + strokeRect: [implementation] |
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 polgyons 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 47 of file CPBezierPath.j.
- (void) appendBezierPath: | (NSBezierPath *) | other | [implementation] |
Append the contents of a CPBezierPath object.
Definition at line 279 of file CPBezierPath.j.
- (void) appendBezierPathWithOvalInRect: | (CGRect) | rect | [implementation] |
Append an oval path; oval is drawn within the rectangular path.
Definition at line 263 of file CPBezierPath.j.
- (void) appendBezierPathWithPoints: | (CPArray) | points | ||
count: | (unsigned) | count | ||
[implementation] |
Append a series of line segments.
Definition at line 247 of file CPBezierPath.j.
- (void) appendBezierPathWithRect: | (CGRect) | rect | [implementation] |
Append a rectangular path.
Definition at line 255 of file CPBezierPath.j.
- (void) appendBezierPathWithRoundedRect: | (CGRect) | rect | ||
xRadius: | (float) | xRadius | ||
yRadius: | (float) | yRadius | ||
[implementation] |
Append a rounded rectangular path.
Definition at line 271 of file CPBezierPath.j.
+ (CPBezierPath) bezierPath | [implementation] |
Create a new CPBezierPath object.
Definition at line 56 of file CPBezierPath.j.
+ (CPBezierPath) bezierPathWithOvalInRect: | (CGRect) | rect | [implementation] |
Create a new CPBezierPath object initialized with an oval path drawn within a rectangular path.
Definition at line 64 of file CPBezierPath.j.
+ (CPBezierPath) bezierPathWithRect: | (CGRect) | rect | [implementation] |
Create a new CPBezierPath object initialized with a rectangular path.
Definition at line 76 of file CPBezierPath.j.
- (void) closePath | [implementation] |
Create a line segment between the first and last points in the subpath, closing it.
Definition at line 171 of file CPBezierPath.j.
- (CGPoint) currentPoint | [implementation] |
Get the current point.
Definition at line 239 of file CPBezierPath.j.
- (void) curveToPoint: | (CGPoint) | endPoint | ||
controlPoint1: | (CGPoint) | controlPoint1 | ||
controlPoint2: | (CGPoint) | controlPoint2 | ||
[implementation] |
Add a cubic Bezier curve to the path.
Definition at line 163 of file CPBezierPath.j.
+ (float) defaultLineWidth | [implementation] |
Get default line width.
Definition at line 88 of file CPBezierPath.j.
- (unsigned) elementCount | [implementation] |
Get the total number of elements.
Definition at line 223 of file CPBezierPath.j.
- (void) fill | [implementation] |
Fill the path with the current fill color.
Definition at line 193 of file CPBezierPath.j.
+ (void) fillRect: | (CGRect) | aRect | [implementation] |
Fill rectangular path with current fill color.
Definition at line 104 of file CPBezierPath.j.
- (id) init | [implementation] |
Create a new CPBezierPath object using the default line width.
Definition at line 133 of file CPBezierPath.j.
- (BOOL) isEmpty | [implementation] |
Check if receiver is empty, returns appropriate Boolean value.
Definition at line 231 of file CPBezierPath.j.
- (void) lineToPoint: | (CGPoint) | point | [implementation] |
Append a straight line to the path.
Definition at line 155 of file CPBezierPath.j.
- (float) lineWidth | [implementation] |
Get the line width.
Definition at line 207 of file CPBezierPath.j.
- (void) moveToPoint: | (CGPoint) | point | [implementation] |
Moves the current point to another location.
Definition at line 147 of file CPBezierPath.j.
- (void) removeAllPoints | [implementation] |
Remove all path elements; clears path.
Definition at line 286 of file CPBezierPath.j.
+ (void) setDefaultLineWidth: | (float) | width | [implementation] |
Set default line width.
Definition at line 96 of file CPBezierPath.j.
- (void) setLineWidth: | (float) | lineWidth | [implementation] |
Set the line width.
Definition at line 215 of file CPBezierPath.j.
- (void) stroke | [implementation] |
Draw a line along the path with the current stroke color and default drawing attributes.
Definition at line 179 of file CPBezierPath.j.
+ (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 120 of file CPBezierPath.j.
+ (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 112 of file CPBezierPath.j.