GSPenProtocol Protocol Reference
| Declared in | GSPenProtocol.h |
Tasks
– moveTo:required method– lineTo:required method– curveTo:off1:off2:required method– qCurveTo:required method– closePathrequired method– endPathrequired method– startGlyph:– beginPath– setFillColor:
Instance Methods
closePath
Close the current sub path. You must call either pen.closePath() or pen.endPath() after each sub path.
- (void)closePath
curveTo:off1:off2:
Draw a cubic bezier with an arbitrary number of control points.
- (void)curveTo:(NSPoint)pt
off1:(NSPoint)off1 off2:(NSPoint)off2
Discussion
The last point specified is on-curve, all others are off-curve (control) points. If the number of control points is > 2, the segment is split into multiple bezier segments.
endPath
End the current sub path, but don’t close it. You must call either pen.closePath() or pen.endPath() after each sub path.
- (void)endPath
moveTo:
Begin a new sub path, set the current point to ‘pt’. You must end each sub path with a call to pen.closePath() or pen.endPath().
- (void)moveTo:(NSPoint)pt