Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
- Subject: Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
- From: Graham Cox <email@hidden>
- Date: Sat, 15 May 2010 08:58:56 +1000
I haven't used this function but its behaviour seems logical to me. If the height changes it has to scale the ends to fill that height and if they were the end caps of a button (I guess its main intended use) then it would be necessary to preserve the aspect ratio in order that, e.g. round end caps remain round. The same is not true of a width change, where the round end caps are the same regardless and do not have to be scaled.
--Graham
On 15/05/2010, at 6:53 AM, aaron smith wrote:
> http://i.imgur.com/cikiL.png - as soon as the height is changed, it's
> scaling everything. This can't be right?
>
> When the view draws, it's using [self bounds] as the frame for
> NSDrawThreePartImage.
>
> Here's my code that slices up the image for scale three:
> http://pastebin.com/HgVGyLEp
>
> I've put a bunch of logging in this method, and all of the rects are
> always the same size, which is correct. So i'm not sure where the
> scaling of the image is being introduced.
_______________________________________________
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