Re: Centering an NSImageView in NSScrollView (again)
Re: Centering an NSImageView in NSScrollView (again)
- Subject: Re: Centering an NSImageView in NSScrollView (again)
- From: Timothy Larkin <email@hidden>
- Date: Sat, 12 Oct 2002 13:55:38 -0400
I worked on this problem for some time without coming up with a good
solution for centering the image view in the scroll view.
But there's another approach which amounts to almost the same thing,
and is pretty easy. Let the image view fill the content view in the
usual way, without worrying about centering. Then override image
view's drawRect: to draw its image centered in the view.
The centering of the image drawing can be done by computing an
appropriate transform and then sending the image a drawInRect: message.
I am happy to share some code.
--
Timothy Larkin
Abstract Tools
Caroline, NY
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.