Declared in GSPenProtocol.h

Tasks

Instance Methods

beginPath

starts an empty new path

- (void)beginPath

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

lineTo:

Draw a straight line from the current point to ‘pt’.

- (void)lineTo:(NSPoint)pt

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

qCurveTo:

Draw a whole string of quadratic curve segments.

- (void)qCurveTo:(FTPointArray *)points

Discussion

The last point specified is on-curve, all others are off-curve points.

setFillColor:

color drawing

- (void)setFillColor:(NSColor *)color

startGlyph:

To initialize stuff

- (void)startGlyph:(GSLayer *)layer