views:

176

answers:

2

Hi,

I have an NSView in which the user can draw circles. These circles are stored as an array of NSBezierPaths, and in drawRect:, I loop through the array and call -stroke on each of the paths. How do I add a button to zoom in and out the NSView? Just change the bounds of the view?

Thanks.

+4  A: 

Send your view a scaleUnitSquareToSize: message.

Peter Hosey
+2  A: 

You might also find this informative:

http://developer.apple.com/mac/library/qa/qa2004/qa1346.html

The code in that document lets you add a "scale" property to a view.

NSResponder