Skip to content

Fix gradient fill artifacts by removing overlapping segment ranges#1

Open
turtleandr wants to merge 1 commit into
mainfrom
fix/gradient-artifact-issue
Open

Fix gradient fill artifacts by removing overlapping segment ranges#1
turtleandr wants to merge 1 commit into
mainfrom
fix/gradient-artifact-issue

Conversation

@turtleandr

Copy link
Copy Markdown
Owner

Problem

When using LineDataSet with setDrawFilled(true) and a gradient drawable, visible vertical seams appear between filled segments.

This happens because drawLinearFill() artificially expands the drawing range (startIndex - 1 / endIndex + 1) for drawable fills, which causes overlapping filled paths. Gradient drawables render alpha blending differently on overlapping areas, resulting in visible artifacts.

Solution

The fix removes the artificial range expansion and renders each filled segment strictly within its own index range.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant