• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
      • From: Ken Ferry <email@hidden>
References: 
 >NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that? (From: aaron smith <email@hidden>)

  • Prev by Date: NSTreeController and remove:
  • Next by Date: Re: Looking for Cocoa Drawing Strategy Advice
  • Previous by thread: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
  • Next by thread: Re: NSDrawThreePartImage - Strange scaling behavior, is it supposed to do that?
  • Index(es):
    • Date
    • Thread