g.drawPoly/fillPoly have a limit of 64 nodes #6647
Replies: 1 comment
-
Posted at 2022-01-09 by myownself Funnily enough I hit the same limit just last night. In my case, though, what I was doing was a bad idea anyway and I knew it. Still, would have been nice to know in advance. Posted at 2022-01-10 by @gfwilliams Thanks - yes, I'll update the docs. Posted at 2022-08-14 by @allObjects Hit that limit a while ago... if your algorithm can handle a detection and cut-up in multiple 'touching' polys / segments, it is easy to live with the limitation. I had build a circular multi dial... and on a certain size with close to 360 degrees and expectation of decent smoothness of the 'bent bar'/bow, you run quickly into the limit. Luckily for me, I calculate max 30 points of a segment, note the angel and finish calculating the rest of the segment, draw it, and move on to the next segment until the desired angle is covered. Somewhere in the (difficult to search) forum you can find the code... Posted at 2022-08-14 by @allObjects ...here it is... it is in someone elses conversation New to Bangle.js and Espruino. Need help with graphics... Nov 2020 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-01-09 by Andreas_Rozek
it may be useful to mention in the docs of g.drawPoly and g.fillPoly, that there is a hard-coded limit of the number of polygon nodes - namely 64!
It would have saved me some time I spent developing code which turned out to be principally unable to run because of this restriction!
Beta Was this translation helpful? Give feedback.
All reactions