diff --git a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart index 44950c2958767..7e08092ae14ed 100644 --- a/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart +++ b/lib/web_ui/lib/src/engine/skwasm/skwasm_impl/path.dart @@ -50,7 +50,7 @@ class SkwasmPath extends SkwasmObjectWrapper implements ScenePath { void lineTo(double x, double y) => pathLineTo(handle, x, y); @override - void relativeLineTo(double x, double y) => pathRelativeMoveTo(handle, x, y); + void relativeLineTo(double x, double y) => pathRelativeLineTo(handle, x, y); @override void quadraticBezierTo(double x1, double y1, double x2, double y2) => diff --git a/lib/web_ui/test/ui/path_test.dart b/lib/web_ui/test/ui/path_test.dart index 94094a03b50ba..03c15fcd2d741 100644 --- a/lib/web_ui/test/ui/path_test.dart +++ b/lib/web_ui/test/ui/path_test.dart @@ -239,4 +239,13 @@ Future testMain() async { expect(newFirstMetric.extractPath(4.0, 10.0).computeMetrics().first.length, 6.0); // TODO(hterkelsen): isClosed always returns false in the HTML renderer, https://github.com/flutter/flutter/issues/114446 }, skip: isHtml); + + test('path relativeLineTo', () { + final p = Path(); + p.moveTo(100, 100); + p.relativeLineTo(-50, -50); + p.relativeLineTo(100, 0); + p.relativeLineTo(-50, 50); + expect(p.getBounds(), equals(const Rect.fromLTRB(50.0, 50.0, 150.0, 100.0))); + }); }