Skip to content

Closed path has a gap #211

@rzinnatullin

Description

@rzinnatullin

Reproduction code:

    const image = PImage.make(200, 200);
    const ctx = image.getContext("2d");
    ctx.strokeStyle = "red";
    ctx.lineWidth = 10;
    ctx.beginPath();
    ctx.moveTo(20, 20);
    ctx.lineTo(50, 20);
    ctx.lineTo(50, 70);
    ctx.lineTo(20, 70);
    ctx.closePath();
    ctx.stroke();

or (exactly the same result):

    const image = PImage.make(200, 200);
    const ctx = image.getContext("2d");
    ctx.strokeStyle = "red";
    ctx.lineWidth = 10;
    ctx.beginPath();
    ctx.rect(20, 20, 30, 50);
    ctx.stroke();

Actual result:

Image

Expected result:
There should be no gap in the left top corner of the rectangle.

Version: 0.4.18
Node version: v20.11.0
OS: Windows 24H2 (OS Build 26100.2894)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions