espruino / Espruino

The Espruino JavaScript interpreter - Official Repo
http://www.espruino.com/
Other
2.76k stars 741 forks source link

Regression for commit Graphics: Fix drawString with combination of g.setClipRect and g.setRotation #2326

Closed ps-igel closed 1 year ago

ps-igel commented 1 year ago

Hi Gordon,

I think there is some kind of bug in this commit: Graphics: Fix drawString with combination of g.setClipRect and g.setRotation

When I write text using drawString to my ePaper display on my Espruino wifi, the text is being displayed correctly in <=2v13 and is being clipped in versions >=2v14. Code is exactly the same in both instances:

display.g.bw.setFontVector(30).setRotation(1).drawString("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",0,0);
display.g.rw.setFontVector(30).setRotation(1).drawString("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",0,30);
display.g.bw.setFontVector(30).setRotation(1).drawString("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",0,60);
display.g.rw.setFontVector(30).setRotation(1).drawString("ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ",0,90);

<=2v13 image

>=2v14 image

gfwilliams commented 1 year ago

Eeep - ok, thanks for narrowing this down! I've just reproduced this here and put a fix in.

By the way, that epaper LCD looks lovely!