Change the lumens overlay for more consistent rendering #3911
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Identify the Bug or Feature request
Addresses #3907
Description of the Change
We now render only disjoint lumens levels rather than relying on
AlphaComposite.Src
to erase prior rendering. Using the disjoint areas also means the boundaries can be draw overtop the various lumens levels rather than being interleaved. The boundaries are also now rendered as black regardless of the overlay opacity, and the stroke has been changed to use rounded corners as they have a little more consistent appearance at different zoom levels.The
Illumination
class has been refactored a bit to keep it more focused. It no longer exposes the base list ofLumensLevel
that it was created from (getLumensLevels()
), but instead returns only those results that are meaningful to callers (getObscuredLumensLevels()
andgetDisjointObscuredLumensLevels()
). This also includes moving the logic for incorporating extra lights (e.g., personal lights) out ofZoneView
and intoIllumination.withExtraLights()
. The documentation has also been increased to clarify the meaning of each result.Possible Drawbacks
Should be none.
Documentation Notes
N/A
Release Notes
N/A
This change is