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

Abnormal drawing of moveTo() of path #2093

Closed
Tracked by #2067
JSUYA opened this issue Mar 26, 2024 · 0 comments
Closed
Tracked by #2067

Abnormal drawing of moveTo() of path #2093

JSUYA opened this issue Mar 26, 2024 · 0 comments
Assignees
Labels
bug Something isn't working raster Rasterizers (sw/gl/wgpu) showstopper Regression bugs / Critical errors
Milestone

Comments

@JSUYA
Copy link
Member

JSUYA commented Mar 26, 2024

case 1

    auto line1 = tvg::Shape::gen();
    line1->moveTo(100, 100); // 1st moveTo
    line1->lineTo(150, 100);
    line1->close();

    line1->moveTo(100, 200);  // 2nd moveTo
    line1->lineTo(150, 200);
    line1->close();

    line1->moveTo(100, 300); // 3rd moveTo
    line1->lineTo(150, 300);
    line1->lineTo(150, 350);
    line1->lineTo(100, 350);
    line1->lineTo(50, 400); // Connected to 3rd MoveTo
    // No close

    line1->moveTo(100, 450); // 4th moveTo
    line1->lineTo(150, 450);
    line1->close();

    line1->strokeFill(255, 0, 0);                //color: r, g, b
    line1->strokeWidth(10);

    if (canvas->push(std::move(line1)) != tvg::Result::Success) return;

case 2

    auto line1 = tvg::Shape::gen();
    //line1->moveTo(100, 100);  // 1st moveTo
    //line1->lineTo(150, 100);
    //line1->close();

    line1->moveTo(100, 200); // 2nd moveTo
    line1->lineTo(150, 200);
    line1->close();

    line1->moveTo(100, 300); // 3rd moveTo
    line1->lineTo(150, 300);
    line1->lineTo(150, 350);
    line1->lineTo(100, 350);
    line1->lineTo(50, 400);
    // No close

    line1->moveTo(100, 450); // 4th moveTo
    line1->lineTo(150, 450);
    line1->close();

    line1->strokeFill(255, 0, 0);                //color: r, g, b
    line1->strokeWidth(10);

    if (canvas->push(std::move(line1)) != tvg::Result::Success) return;

In case 1, 3rd moveTo() is connected to the last LineTo() even though there is no close().
Since there is no close(), the stroke should start again from the 4th moveTo().
If you delete some path information like in case 2, it works normally.

@JSUYA JSUYA added the bug Something isn't working label Mar 26, 2024
@hermet hermet added the raster Rasterizers (sw/gl/wgpu) label Mar 26, 2024
@hermet hermet self-assigned this Mar 26, 2024
@hermet hermet added the showstopper Regression bugs / Critical errors label Mar 26, 2024
@hermet hermet mentioned this issue Mar 26, 2024
37 tasks
@hermet hermet added this to the 0.13 milestone Mar 26, 2024
hermet added a commit that referenced this issue Mar 27, 2024
there has been a logical error that breaks the contour
composition context. This fixes it.

issue: #2093
hermet added a commit that referenced this issue Mar 27, 2024
there has been a logical error that breaks the contour
composition context. This fixes it.

issue: #2093
@hermet hermet closed this as completed Mar 27, 2024
hermet added a commit that referenced this issue Mar 29, 2024
there has been a logical error that breaks the contour
composition context. This fixes it.

issue: #2093
hermet added a commit that referenced this issue Apr 5, 2024
there has been a logical error that breaks the contour
composition context. This fixes it.

issue: #2093
hermet added a commit that referenced this issue Apr 6, 2024
there has been a logical error that breaks the contour
composition context. This fixes it.

issue: #2093
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working raster Rasterizers (sw/gl/wgpu) showstopper Regression bugs / Critical errors
Projects
Status: Done 0.13
Development

No branches or pull requests

2 participants