On 30/04/2011, at 1:01 AM, McLaughlin, Michael P. wrote:

> appeared to have applied the transform to the path linewidth as well.  Is
> this how it is supposed to work?

Yes. A transform scales the whole drawing coordinate system, so the stroke 
width is scaled as well.

> Since this would seem to be a common task, is there a recommended way to
> keep linewidth = 1 (and likewise for data-point circles) or would I be
> better off just doing the transformations "manually" beforehand?


You can either a) compensate the linewidth by the inverse of the scale,  b) use 
a linewidth of 0, which will draw a 1-pixel wide line regardless of scale. 
However, this latter approach is not such a good idea if the view can be 
printed, because 1-pixel on a high resolution printer is extremely fine, or c) 
if your graph data is in the form of a path, you can scale the path by the 
transform rather than scale the view, then it will have the stroke width you 
give it. See [NSBezierPath transformUsingAffineTransform;] or 
[NSAffineTransform transformBezierPath:]

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to