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

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



Hello,

I'm working on a program (written by someone else) to use PyGame to display some images for use in a psychological experiment. I am new to PyGame.

For the experiment we need to display circles of a given physical size (let's that the diameter must be 30mm). Currently the program seems to do the conversion with a hardcoded value.

I wanted to know if it possible to compute this value automatically.

If I understand correctly, I need to know the physical size of the screen and the resolution. Knowing the resolution is simple with PyGame but how can I access the screen size?

The program should be multi-platform.

Any advice?

Thanks in advance,
Mathieu