Skip to content

Commit

Permalink
Add new golden for extreme curve
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero committed Jun 6, 2024
1 parent 42e6ba7 commit 3c04a50
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions impeller/aiks/aiks_path_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,25 @@ TEST_P(AiksTest, CanRenderStrokePathWithCubicLine) {
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}

TEST_P(AiksTest, CanRenderQuadraticStrokeWithInstantTurn) {
Canvas canvas;

Paint paint;
paint.color = Color::Red();
paint.style = Paint::Style::kStroke;
paint.stroke_cap = Cap::kRound;
paint.stroke_width = 50;

// Should draw a diagonal pill shape. If flat on either end, the stroke is
// rendering wrong.
PathBuilder builder;
builder.MoveTo({250, 250});
builder.QuadraticCurveTo({100, 100}, {250, 250});

canvas.DrawPath(builder.TakePath(), paint);
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
}

TEST_P(AiksTest, CanRenderDifferencePaths) {
Canvas canvas;

Expand Down

0 comments on commit 3c04a50

Please sign in to comment.