Scaling a credit card

Hello,

Could someone be able to explain why we have x_scale=60, y_scale=40 hard coded like that?
Should this not depend on the monitor of the user?

Here’s the original link that resizes the credit card:

Code from the link that is confusing:
if win.units==‘norm’:
x_scale=.05
y_scale=.1
dbase = .0001
unittext=’ norm units’
vsize=2
elif win.units==‘pix’:
x_scale=60
y_scale=40
dbase = .1
unittext=’ pixels’
vsize=win.size[1]
else:
x_scale=.05
y_scale=.05
dbase = .0001
unittext=’ height units’
vsize=1

thanks

Hi,

You have to start somewhere. Those are the initial values before the participant starts changing the size to match reality. I could do something more fancy to take into account the aspect ratio of the monitor but I didn’t have that code to hand when I wrote the script.

Best wishes,

Wakefield

:slight_smile: ok, thanks for clarifying.