I am writing the drawRect routine for a custom view in which I need to draw a simple X-Y graph, given the data. Desiring to be elegant and up-to-date, I decided that the best (Cocoa) way to do this was to construct a scaling affine transform to change x,y coordinates into view coordinates using
CGAffineTransform matrix = CGAffineTransformMakeScale(360/(x2 - x1), 240/(y2 - y1)); followed by CGContextConcatCTM(context, matrix); When I tried this, [graphPath stroke]; appeared to have applied the transform to the path linewidth as well. Is this how it is supposed to work? 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? TIA. -- Mike McLaughlin _______________________________________________ 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