Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #856: Polyline border drawing #866

Merged
merged 1 commit into from Apr 6, 2021
Merged

Conversation

Ahmed-gubara
Copy link
Contributor

Fix for Issue #856
This fix Polyline border drawing bug introduced in version 0.11.0 PR #766 .
Causing the bug was that borderPaint.style = PaintingStyle.stroke was set after the drawing line _paintLine(...,borderPaint), which made the drawing use the default PaintingStyle.fill causing the border to create a filled shape.

if (borderPaint != null) {
if (filterPaint != null) {
filterPaint.style = PaintingStyle.stroke;
_paintLine(canvas, polylineOpt.offsets, borderPaint);
}
borderPaint?.style = PaintingStyle.stroke;
_paintLine(canvas, polylineOpt.offsets, filterPaint);
}

Reordering the style set statement before the _paintLine(...) statement fixed the bug.

flutter_map

@Ahmed-gubara Ahmed-gubara marked this pull request as draft April 6, 2021 13:29
@Ahmed-gubara Ahmed-gubara marked this pull request as ready for review April 6, 2021 13:33
@Ahmed-gubara
Copy link
Contributor Author

Hey @kengu, can you please review the changes?

Copy link
Contributor

@kengu kengu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kengu
Copy link
Contributor

kengu commented Apr 6, 2021

@Ahmed-gubara Tested locally and it seems to work as expected. Thanks for the contribution!

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.

None yet

2 participants