Re: NSImageView and ZoomFactors

2010-08-20 Thread Quincey Morris
On Aug 20, 2010, at 12:13, Brian Postow wrote: > So, just to clarify, the whole hierarchy is Window> ContentView > ScrollView > > ClipView > ImageView > Image? I take the "ContentView" to mean the content > view of the window, or is there some other view between the scrollview and > the clipvie

Re: NSImageView and ZoomFactors

2010-08-20 Thread Brian Postow
On Aug 20, 2010, at 2:52 PM, Quincey Morris wrote: > On Aug 20, 2010, at 10:54, Brian Postow wrote: > >> I just discovered[imageView setImageAlignment: ] which, as long as the >> imageView is bigger than the scrollview, does the correct thing (Lock the >> image to the upper left corner of

Re: NSImageView and ZoomFactors

2010-08-20 Thread Quincey Morris
On Aug 20, 2010, at 10:54, Brian Postow wrote: > I just discovered [imageView setImageAlignment: ] which, as long as the > imageView is bigger than the scrollview, does the correct thing (Lock the > image to the upper left corner of the scrollView). However, when the > imageView is smaller

Re: NSImageView and ZoomFactors

2010-08-20 Thread Brian Postow
On Aug 20, 2010, at 1:35 PM, Quincey Morris wrote: > On Aug 20, 2010, at 06:46, Brian Postow wrote: > >> Ok,. Since the NSImageView wants to always center the image in the bounds >> rect, that should make the translation (moving the origin) not too hard, yes? > > Yes, though I'd say it differe

Re: NSImageView and ZoomFactors

2010-08-20 Thread Quincey Morris
On Aug 20, 2010, at 06:46, Brian Postow wrote: > If I don't want to be using NSImageView, what DO I want to be using? I > started out trying to use IKImageView, but that is swatting a fly with a > bazooka. It takes like 2 seconds to draw the image because its doing lots of > thumbnailing and s

Re: NSImageView and ZoomFactors

2010-08-20 Thread Brian Postow
On Aug 19, 2010, at 10:56 PM, Kyle Sluder wrote: > On Thu, Aug 19, 2010 at 4:54 PM, Quincey Morris > wrote: >> On Aug 19, 2010, at 12:44, Brian Postow wrote: >> >>> ah, so, the way to zoom is to leave the NSImageView on >>> NSImageScaleProportionallyUpOrDown, and then change the size of the fr

Re: NSImageView and ZoomFactors

2010-08-20 Thread Brian Postow
On Aug 19, 2010, at 7:54 PM, Quincey Morris wrote: > On Aug 19, 2010, at 12:44, Brian Postow wrote: > >> ah, so, the way to zoom is to leave the NSImageView on >> NSImageScaleProportionallyUpOrDown, and then change the size of the frame! >> That gives me scrollbars! > > I had to go out for a

Re: NSImageView and ZoomFactors

2010-08-19 Thread Quincey Morris
On Aug 19, 2010, at 19:56, Kyle Sluder wrote: > It sounds as if you're conflating bounds transformation scaling with > NSImageView size-to-fit-frame scaling. It's usually the case that you > don't want to rely on a scaled bounds coordinate system to draw zoomed > UI for the precise reason you ment

Re: NSImageView and ZoomFactors

2010-08-19 Thread Kyle Sluder
On Thu, Aug 19, 2010 at 4:54 PM, Quincey Morris wrote: > On Aug 19, 2010, at 12:44, Brian Postow wrote: > >> ah, so, the way to zoom is to leave the NSImageView on >> NSImageScaleProportionallyUpOrDown, and then change the size of the frame! >> That gives me scrollbars! > > I had to go out for a

Re: NSImageView and ZoomFactors

2010-08-19 Thread Quincey Morris
On Aug 19, 2010, at 12:44, Brian Postow wrote: > ah, so, the way to zoom is to leave the NSImageView on > NSImageScaleProportionallyUpOrDown, and then change the size of the frame! > That gives me scrollbars! I had to go out for a while before finishing my last post, but I wanted to point out

Re: NSImageView and ZoomFactors

2010-08-19 Thread Brian Postow
On Aug 19, 2010, at 2:33 PM, Quincey Morris wrote: > >> How big do I make the imageview? Currently, it's the same size as the >> clipview. > > It doesn't matter what you do in IB, because you're going to have to do > something else programmatically later. You basically have 2 modes: zoom to

Re: NSImageView and ZoomFactors

2010-08-19 Thread Quincey Morris
On Aug 19, 2010, at 11:12, Brian Postow wrote: > Ok, the NSScrollView came with an NSView in it. I changed that to NSClipView, > and added an NSImageView in the clipview. Er, no. The NSScrollView came with a NSClipView and a NSView, but IB helpfully hides the NSClipView. So you don't need to ad

Re: NSImageView and ZoomFactors

2010-08-19 Thread Brian Postow
[Dagnabit, did reply instead of reply all] On Aug 19, 2010, at 1:45 PM, Quincey Morris wrote: > On Aug 19, 2010, at 07:16, Brian Postow wrote: > >> so, are you suggesting that I manually control the "zoom-to-fit" >> functionality, and change the size of the image as the window changes size >

Re: NSImageView and ZoomFactors

2010-08-19 Thread Quincey Morris
On Aug 19, 2010, at 07:16, Brian Postow wrote: > so, are you suggesting that I manually control the "zoom-to-fit" > functionality, and change the size of the image as the window changes size > myself so I can keep track of the "desired display scale"? or is there some > other way of getting th

Re: NSImageView and ZoomFactors

2010-08-19 Thread Brian Postow
On Aug 18, 2010, at 7:07 PM, Quincey Morris wrote: > On Aug 18, 2010, at 15:01, Brian Postow wrote: > >> The two things that IKImageView gave me that I'm having trouble making >> NSImageView do a similar thing are 1) zooming and 2) the mouse-tools. >> >> 1) I can see how to use scaleUnitSquare

Re: NSImageView and ZoomFactors

2010-08-18 Thread Quincey Morris
On Aug 18, 2010, at 15:01, Brian Postow wrote: > The two things that IKImageView gave me that I'm having trouble making > NSImageView do a similar thing are 1) zooming and 2) the mouse-tools. > > 1) I can see how to use scaleUnitSquareToSize to zoom, but that doesn't tell > me the CURRENT zoom,