• 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
Suppression of bounds expansion upon call to scaleUnitSquareToSize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suppression of bounds expansion upon call to scaleUnitSquareToSize


  • Subject: Suppression of bounds expansion upon call to scaleUnitSquareToSize
  • From: Aaron Braunstein <email@hidden>
  • Date: Mon, 24 Jan 2005 12:23:20 -0800

OK, I'm sure this is another example of somebody overlooking the obvious - even when they've RTFM, but with the philosophy of "the only stupid question is the question left unasked" I'm gonna ask anyway. :)
In brief, I've got an NSView subclass in which I'd like to implement a zoom/shrink feature. scaleUnitSquareToSize seems to do everything that I need it to do, with one exception: it re-scales the rect of my view. I know that it is supposed to do this, but this causes problems in that if you envision the area (which lives within a scroll view, if that makes any substantive difference) as a sheet of paper of a certain size upon which you can draw, then using scaleUnitSquareToSize with size parms of < 1 to shrink it the paper grows in terms of co-ordinates. This means that you could draw on regions of the paper that were previously unavailable and - worse - which will disappear when the page is zoomed later via size parms > 1 (due to the area's bounds rect being shrunk to scale.)
The obvious thought is to simply re-set the area's bounds, but that act also carries an implicit re-scale... so in effect I am undoing re-scaling back to right where I was when I started. I've tried a number of other solutions, none of which have worked. Before I start down the seemingly-far-too-convoluted path of creating an off-screen area to be swapped in at need to see if THAT will work, I figured I'd ask the bigger brains available on this list. Does anybody have any suggestions for exploration?

--
Aaron Braunstein
"Good enough" shouldn't be. From there the fall into mediocrity and indifference is a short one.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: [Cocoa-Java] Seeking some explanations around anNotSerializableException
  • Next by Date: Question on cocoa style: value for (id)sender parameter
  • Previous by thread: Re: Changing the language at runtime
  • Next by thread: Question on cocoa style: value for (id)sender parameter
  • Index(es):
    • Date
    • Thread