Closed BroMarduk closed 3 years ago
Any calculation tips?
Yes. I was going to start here, but have not tested yet. The hardcoded resolutions probably need to be changed to variables for different resolutions.
if pitft.pigamerotr==0:
rel=(rel[0],rel[1])
if pitft.pigamerotr==90:
e={"x":e["x"],"y":240-e["y"]}
rel=(rel[0],rel[1]*-1)
elif pitft.pigamerotr==180:
e={"x":320-e["x"],"y":240-e["y"]}
rel=(rel[0]*-1,rel[1]*-1)
elif pitft.pigamerotr==270:
e={"x":320-e["x"],"y":e["y"]}
rel=(rel[0]*-1,rel[1])
else:
raise(Exception("PiTft rotation is unsupported"))
Add in the ability to support rotations of 0 and 180. (Portrait mode)