[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] How to control the physical size of displayed objects?





Le 27/02/2013 22:33, Julian a écrit :
On 02/27/2013 04:23 PM, Mathieu Dubois wrote:
Just a last question: do you think the horizontal and vertical factors
has to be the same? Because list_modes() tells me that my monitor can
display: 1280x800 (ratio: 1.6), 1024x768 (ratio: 1.33), 800x600
(ratio: 1.33), 640x480 (ratio: 1.33).

You mean dealing with wrong aspect ratios? That's a tough one because
different drivers handle it differently; some distort the picture, some
zoom it while maintaining the aspect ratio, some don't zoom it at all. I
would say that it's best to either assume there is no distortion of
aspect ratio (i.e. a square is a square), or allow a horizontal
adjustment that normally syncs with the vertical adjustment.

I'm not sure to understand the difference between the 2 solutions you suggest but it seems reasonnable to assume that the horizontal and vertical ratios are the same (a square image of say 256x256 pixels will be displayed as a square).

I will try to code a simple application in order to test.

Mathieu