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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to