• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: scaleUnitSquareToSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scaleUnitSquareToSize


  • Subject: Re: scaleUnitSquareToSize
  • From: Gideon King <email@hidden>
  • Date: Sun, 17 Oct 2010 07:40:29 +1000

You might like to check out http://apptree.net/gczoomview.htm which has all the basics of zooming handled, and could be pretty easily configured to do what you want.

Regards

Gideon

On 17/10/2010, at 7:09 AM, email@hidden wrote:

> I am using scaleUnitSquareToSize to zoom out / zoom in on a design being created in a subclass of NSView.
>
> After calling:
>
> - (IBAction)zoom:(id)sender {
>
> 	NSSize sz = NSSizeFromString(@"{0.75,0.75}");
> 	[self scaleUnitSquareToSize:sz];
> 	[self display];
> }
>
>
> .. the view scales and moves toward the view origin. This is expected behavior.
>
> I am looking for a recommendation on how to keep the 'zoomed' contents in the center of the view.
>
> Should I do a CGContextTranslateCTM before calling -display?  Is this the proper approcah?
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: scaleUnitSquareToSize
      • From: email@hidden
References: 
 >scaleUnitSquareToSize (From: email@hidden)

  • Prev by Date: Re: scaleUnitSquareToSize
  • Next by Date: Re: scaleUnitSquareToSize
  • Previous by thread: Re: scaleUnitSquareToSize
  • Next by thread: Re: scaleUnitSquareToSize
  • Index(es):
    • Date
    • Thread