[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Smooth scaling using WMF drawings
Ben Friman wrote:
Here's something for the weekend:
I am planning an application in which all window contents will scale automatically to
the window size. I don't want to see the pixellation effects which you get with scaling
bitmaps, so I had a look at what can be done with .WMF drawings. Here's the result,
using PIL with Pygame.
Hi, haven't tried, also i don't use windows anymore, so no go (propably?)...
But i just wanted to mention one funny thing i saw not so long ago...
In the cool Open Source FreeWheeling Loop sampler - and - player's
config the gui is designed through an XML - like language...
And to keep it stretchin' and shrinkin' across the resolutions, he just
reduces his window coordinates to float (0.0) to float (1.0), that's it.
(eg. with 640x480: [0.0, 0.0] = [0, 0], [1.0, 1.0] = [640, 480] )
So his GUI works in all resolutions, because it's easy to scale everything.
It's nothing special, really, but it was so simple it just struck me as
useful and clever.