On Jul 29, 2010, at 7:30 PM, Tony Romano wrote: > Moved the code to here. http://dl.dropbox.com/u/5614061/snippet.txt > > The drawRect redraws the entire view. So, in a sense, I am drawing over > everything in that view. What's interesting, is the lines are left from the > first time I adjust the blue lines, any additional adjustments to the blue > line don't leave any residuals. > > Changing the setLineWidth prior to any drawing doesn't have any affect on the > problem. Didn't think it would as I understand the "attributes" are not > applied until the stroke happens. I'll look into Quartz debug.
Not sure if that causes your problem but you should use -drawRect: to draw the view, nothing else. The first half sets visual properties of the window and another view. There are much better places to do that. Secondly - and not sure if that causes the issue either - but it's good practice that whenever you change properties of the current graphics context, you should first store its state and restore it when you're done. That way things that use the same context after you did find it in a state they expect it in. See <http://developer.apple.com/mac/library/documentation/cocoa/reference/ApplicationKit/Classes/NSGraphicsContext_Class/Reference/Reference.html#//apple_ref/doc/uid/20000336-BAJBDIBC> Regards Markus -- __________________________________________ Markus Spoettl _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
