• 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
Scaling image to fit NSButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scaling image to fit NSButton


  • Subject: Scaling image to fit NSButton
  • From: Jan Van Tol <email@hidden>
  • Date: Thu, 13 Feb 2003 14:30:36 -0600

List,

I'm trying to scale an image proportionally to fit inside a square NSButton. I can scale the image fine, but the trouble is figuring out the proper NSSize. If I just scale it to the size of the button, it doesn't maintain the aspect ratio and stretches to fit the button, which I don't want. How can I maintain the aspect ratio?

-Jan Van Tol
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: [NSString stringWithContentsOfURL:] question
  • Next by Date: Re: [NSString stringWithContentsOfURL:] question
  • Previous by thread: Drawing a well like DrawThemeGenericWell but with Cocoa or CoreGraphics?
  • Next by thread: java-bridge list, anyone?
  • Index(es):
    • Date
    • Thread