Skip to content

Graphics.fillPoly glitch #1796

@nebbishhacker

Description

@nebbishhacker

g.fillPoly sometimes produces extraneous horizontal lines when two adjacent points in the list are almost, but not quite, horizontally aligned.

Test case:

g.clear();
g.fillPoly([120, 40,
            200, 200,
            170, 200,
            120, 100,
            70, 180, // line starts at this point and extends to the right
            40, 179]);

Result:

screenshot(1)

Bug was discovered while working on an SVG to bangle draw call converter :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions