Graphics.drawString not working on 1v98? #4642
Replies: 1 comment
-
Posted at 2018-05-22 by @gfwilliams Thanks - I'm looking into this now. That code works fine on the Linux build so all the automated tests passed. If you do Posted at 2018-05-22 by @gfwilliams Ok, now fixed in GitHub. Turns out GCC's handling of signed bit fields seems to be broken (or at the very least different) on non-x86 platforms. I never noticed because in my tests on real hardware I'd been using I'll push a 1v99 version in the next hour or so. Posted at 2018-05-22 by n00b Thanks! looking forward to update. Posted at 2018-05-22 by n00b I flashed via the web IDE to 1v99 and seems like the problem persists (still got empty buffer like the above example). On another test on an 8x8 neopixel
actually draws the "1" character at x:-2 and y:-2, so not centered. Posted at 2018-05-22 by @gfwilliams Which board are you using? I just tried here on a Pixl and also a Pico and it seems ok:
I'm not quite sure I understand about the centering - the default text is normally 4x5 characters so -2,-2 sounds ok, perhaps 1 pixel off depending how you choose to round. Posted at 2018-05-22 by n00b I see - I might misunderstood how the fontAlign works. I am using the original espruino board. Posted at 2018-05-22 by @gfwilliams I just tried an original Espruino board and the code I posted above does work for me. Is there something else that isn't working for you? Have a look at http://www.espruino.com/Reference#l_Graphics_setFontAlign setFontAlign is new, but basically it defines how subsequent calls to You probably wanted:
Posted at 2018-05-22 by n00b Thanks Gordon - strange, I’m getting the empty buffer still. I’ll try again after work and update. Posted at 2018-05-23 by n00b Looks like I was still on 1v98 when I tried the second time around. Confirmed on 1v99 that issue is fixed. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2018-05-22 by n00b
I reflashed to 1v98 and drawString seems to not work:
tried fillRect works fine:
Am I missing anything?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions