Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3c04a50

Browse files
committed
Add new golden for extreme curve
1 parent 42e6ba7 commit 3c04a50

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

impeller/aiks/aiks_path_unittests.cc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,25 @@ TEST_P(AiksTest, CanRenderStrokePathWithCubicLine) {
9191
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
9292
}
9393

94+
TEST_P(AiksTest, CanRenderQuadraticStrokeWithInstantTurn) {
95+
Canvas canvas;
96+
97+
Paint paint;
98+
paint.color = Color::Red();
99+
paint.style = Paint::Style::kStroke;
100+
paint.stroke_cap = Cap::kRound;
101+
paint.stroke_width = 50;
102+
103+
// Should draw a diagonal pill shape. If flat on either end, the stroke is
104+
// rendering wrong.
105+
PathBuilder builder;
106+
builder.MoveTo({250, 250});
107+
builder.QuadraticCurveTo({100, 100}, {250, 250});
108+
109+
canvas.DrawPath(builder.TakePath(), paint);
110+
ASSERT_TRUE(OpenPlaygroundHere(canvas.EndRecordingAsPicture()));
111+
}
112+
94113
TEST_P(AiksTest, CanRenderDifferencePaths) {
95114
Canvas canvas;
96115

0 commit comments

Comments
 (0)