Conversation
By default Arc:segment() clears any background leds making it impossible to stack several segments. Added a boolean flag, "stacking", which defaults to false to preserve original behaviour. Setting it to true skips drawing any background/0 brightness leds.
|
thanks for bringing this up! i have an alternative proposition that i've been meaning to implement, which is a flag for all of the drawing functions to use relative levels. for example: arc:led(1,1,10) -- sets ring 1 LED 1 to 10 similarly this can apply to: arc:all(1, true) -- add 1 to all LEDs level range clamping happens internally. i've implemented similar on the iii arc/grid. a similar set of function extension can/should happen for the grid at the same time. side note function additions: arc:ring(n, level, relative_flag) -- set ring n to level, with relative (basically, all but for one ring) the takeaway is, with the above implemented (which isn't difficult, just a bit of typing/testing) you'd be able to layer segments elegantly and preserve the anti-aliased edges. which, come to think of it--- implementing the segment function in c would be quite sensible, though not entirely necessary. i'm going to leave this open as a reminder, and i'll get this fix on my short list. |
|
got started, tested the grid single led, works. will finish typing the rest tomorrow |
|
this sounds great! like that it's a general solution as well will we be able to do something like this after: |
|
using the relative levels, will it be possible to draw a uniform (let's say 2 brightness) segment over an uneven background? |
|
closed in favor of #1873 |
Fixes #1852
By default Arc:segment() clears any background leds making it impossible to stack several segments.
Added a boolean flag, "stacking", which defaults to false to preserve original behaviour.
Setting it to true skips drawing any background/0 brightness leds.