On Thu, Mar 19, 2009 at 10:44 PM, Alex Holkner <[email protected]>wrote:

>
> On Fri, Mar 20, 2009 at 1:35 PM, tazg <[email protected]> wrote:
> >
> > I have a resizable window that I want to keep its aspect ratio, so I'm
> > doing this:
> >
> > def on_resize(width, height):
> >    window.width = height * 4/3
> >
> > This works but it seems to still draw the window with the original
> > size first, so you can see the border flickering between 2 positions
> > which looks terrible. Any way to fix that?
>
> Only X11 provides an API to restrict a window's aspect ratio (which
> pyglet doesn't expose) -- I think it would be very difficult to get
> this working well on Windows or OS X.


I have accomplished the same thing on the Mac in the past, but in pure
Cocoa, and isn't straight forward. You would have to spend some
(considerable) time messing about in Carbon to figure out all the little
foibles.
-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to