Skip to content

Polyline filled with borderColor #856

@Ahmed-gubara

Description

@Ahmed-gubara

Starting with version 0.11.0 with PR #766
Using Polyline to draw path creates shapes (with borderColor), unless you pass Colors.transparent as borderColor.

flutter_map

Going through the source code i found this part

Paint filterPaint;
if (polylineOpt.borderColor != null) {
filterPaint = Paint()
..color = polylineOpt.borderColor.withAlpha(255)
..strokeWidth = polylineOpt.strokeWidth
..strokeCap = StrokeCap.round
..strokeJoin = StrokeJoin.round
..blendMode = BlendMode.dstOut;
}

and

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

Swapping filterPaint with borderPaint in the function call _paintLine(...) makes Polyline works normally

Should i make PR for that, or is this intentional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue reports broken functionality or another error

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions