Re: Making a new "ICNS file" with NSImage
Re: Making a new "ICNS file" with NSImage
- Subject: Re: Making a new "ICNS file" with NSImage
- From: Andrew Farmer <email@hidden>
- Date: Thu, 17 Sep 2009 22:32:03 -0700
On 17 Sep 2009, at 19:39, Squ Aire wrote:
My problem is this: I want to derive a new "icon file" (simulated by
an NSImage somehow) which has some margins applied to it. The
margins on each side should be the size of the area being drawn on
divided by 100. So for instance, if we are drawing the icon on a
300x300 area, the top,bottom,left,right margins should all be 3. If
drawing on a 30x30 area the margins are .3 or simply negligible.
In other words, I somehow want to make an instance of NSImage such
that if drawn on a 300x300 rect, it will look slightly smaller than
that because of the margins, i.e. it will not fill out the whole
rect as the original ICNS would.
Correct me if I'm missing something, but can't this be accomplished by
simply adding a 10% margin to the original image and scaling that down
as necessary? The behavior you're describing is scale-invariant, after
all.
_______________________________________________
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