LightWidget::drawHalo works well for light sources that are solid circles, but it needs to be adapted for other shapes.
For anyone interested in some examples, on my v2 branch I’ve implemented halos on ring lights, line lights, and my display backlight. The latter two are rounded rectangles (box gradients) while the ring lights are composed of two radial gradients: an outer one and an inverse inner gradient.
Once I had ring halos and line halos, I got knob-light halos for free.
Something to be aware of with box gradients in nanovg is that the specified boundary corresponds to the center of the gradient, not its outer edge.
