[Drawkit] Tapering Cardinal Path

Carlos Phillips amaryl at gmail.com
Sun Jun 22 06:14:59 PDT 2008


Hi,

I wish to create cardinal paths with tapering width. To demonstrate
what I mean by tapered width, imagine that an arrow head is stretched
all the way along the path. I also wish to display text along the
tapered width of the path. I am not sure how to proceed.

>From my reading of the code, I get the feeling that the steps would go
as follows:

1) Create a DKDrawableCardinalPath class that inherits from DKDrawableObject.
The user interface for editing DKDrawableCardinalPath objects would be
similar to DKDrawablePath's handling of straight-line paths. Would it
be wise to subclass DKDrawablePath?

2) Create a DKTaperedStroke class that inherits from DKRasterizer.
Gets an NSBezierPath which contains only curve segments from the
DKDrawableObject. Create a tapered outline around this path.

Am I on the right track?

Will I have to render the text in DKTaperedStroke so that the text can
flow along the tapered stroke?

Thank you for any help that you can provide.

Carlos


More information about the Drawkit mailing list