[Drawkit] Styling line end caps
Graham Cox
graham.cox at bigpond.com
Thu May 29 16:15:21 PDT 2008
The end cap is set up as a property of the DKStroke rasterizer, which
is part of the style. The end cap set on the object's path will have
no effect as the style takes priority.
Depending on how you are setting up the style, you'll need to grab the
DKStroke component and set the line cap parameter there.
cheers, Graham
On 30 May 2008, at 8:08 am, Brad Larson wrote:
> How do you style line end caps? I don't see an entry in DKStyle for
> them. Other places in the framework, lines are styled by styling
> the underlying NSBezierPath, but when I try
>
> [currentBezierPath moveToPoint:point1];
> [currentBezierPath lineToPoint:point2];
> [currentBezierPath setLineCapStyle:NSRoundLineCapStyle];
> DKDrawablePath* currentPath = [[DKDrawablePath alloc]
> initWithBezierPath:currentBezierPath];
>
> during the programmatic generation of a path, the path does not seem
> to use the rounded cap style. I'm just starting to get into the
> styles, so there may be something I'm missing.
More information about the Drawkit
mailing list