• 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: A couple questions relevant to games
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A couple questions relevant to games


  • Subject: Re: A couple questions relevant to games
  • From: glenn andreas <email@hidden>
  • Date: Mon, 18 Feb 2008 11:39:45 -0600


On Feb 18, 2008, at 11:22 AM, Daniel Jalkut wrote:

On Feb 18, 2008, at 10:23 AM, glenn andreas wrote:

The significantly easier way is to use:

[window setContentAspectRatio: 1.0];

(Available from 10.3 on)

I think the aspect ratio setting is not enforced precisely enough or in enough cases. I've had trouble with it not always working. If I remember correctly it has shortcomings when it comes to zooming a window, and perhaps is ignored when setting the frame programatically.



I've not seen that personally, though setAspectRatio suffers from such a fate (since it includes the title bar in the aspect ratio, making it basically useless).



I can't remember all the reasons, but in my crossword solving application it's important to keep the window a size that allows the puzzle grid to be an even pixel multiple. I ended up enforcing it in windowWillResize and windowWillUseStandardFrame.


Daniel


Since you needed pixel multiples, you'd also need to use setContentResizeIncrements:

There may be a bug that the zooming doesn't use setContentResizeIncrements (I've never needed that functionality) but from what I remember, setAspectRatio worked fine with zooming.



Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | flame : flame fractals & strange attractors : build, mutate, evolve, animate




_______________________________________________

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


References: 
 >A couple questions relevant to games (From: Aaron MacDonald <email@hidden>)
 >Re: A couple questions relevant to games (From: j o a r <email@hidden>)
 >Re: A couple questions relevant to games (From: Aaron MacDonald <email@hidden>)
 >Re: A couple questions relevant to games (From: Jens Alfke <email@hidden>)
 >Re: A couple questions relevant to games (From: glenn andreas <email@hidden>)
 >Re: A couple questions relevant to games (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: Line Spacing: NSTextField ~10% > NSTextView for same font
  • Next by Date: Re: A couple questions relevant to games
  • Previous by thread: Re: A couple questions relevant to games
  • Next by thread: Re: A couple questions relevant to games
  • Index(es):
    • Date
    • Thread