• 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: Transforming NSBezierPaths using NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Transforming NSBezierPaths using NSView


  • Subject: Re: Transforming NSBezierPaths using NSView
  • From: Erik Buck <email@hidden>
  • Date: Thu, 22 Feb 2007 09:01:57 -0800 (PST)

Every NSView has a built-in affine transformation matrix.  Any valid transform can be applied to drawing in the view. (scale, rotate, skew, translate in any combination)

  Rather than transforming all of the paths, just transform the view's coordinate system.

  If zooming is all you want, just change the bound size relative to the frame size and all drawing in the view will be scaled.

  More specifically, each time the view is re-sized, store the current bounds.  After the view's frame has been changed, restore the original bounds.  As the frame gets bigger, all drawing will get bigger.  As the frame gets smaller, all drawing will get smaller.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Prev by Date: Re: Transforming NSBezierPaths using NSView
  • Next by Date: Re: Must remove submenu when dealloccing NSMenuItem?
  • Previous by thread: Re: Transforming NSBezierPaths using NSView
  • Next by thread: Vertically aligning text in a table while preserving fontSize bindings
  • Index(es):
    • Date
    • Thread