Re: Scaled NSImage size of NSImageView?
Re: Scaled NSImage size of NSImageView?
- Subject: Re: Scaled NSImage size of NSImageView?
- From: David Duncan <email@hidden>
- Date: Wed, 13 Jan 2010 09:37:21 -0800
On Jan 13, 2010, at 9:36 AM, Dave Fernandes wrote:
> On 2010-01-13, at 12:20 PM, David Duncan wrote:
>
>> That said, I don't see how you couldn't just calculate this yourself. Just grab the size of the image, figure out what the less of the two scales you need to fit the width or height of the image view, then scale the other component by the same value.
>
> How do you take into account the borders of the NSImageView? Is there any way to get their width/height?
Depends on if you have them on or not :). I think the NSImageCell might have that knowledge, but I'm not certain.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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