From 0d93e249c3b9a0cdfc8d182e94b40fb8b8015f9f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 16 Apr 2020 21:06:03 +0200 Subject: [PATCH] LibWeb: Add some basic path drawing functionality to the canvas element This patch adds the following methods to CanvasRenderingContext2D: - beginPath() - moveTo(x, y) - lineTo(x, y) - closePath() - stroke() We also add the lineWidth property. :^) --- Base/home/anon/www/canvas-path.html | 40 +++++++++++ Base/home/anon/www/welcome.html | 1 + .../CanvasRenderingContext2DWrapper.cpp | 71 +++++++++++++++++++ .../CanvasRenderingContext2DWrapper.h | 7 ++ .../LibWeb/DOM/CanvasRenderingContext2D.cpp | 31 ++++++++ .../LibWeb/DOM/CanvasRenderingContext2D.h | 13 ++++ 6 files changed, 163 insertions(+) create mode 100644 Base/home/anon/www/canvas-path.html diff --git a/Base/home/anon/www/canvas-path.html b/Base/home/anon/www/canvas-path.html new file mode 100644 index 0000000000..76d4edc44e --- /dev/null +++ b/Base/home/anon/www/canvas-path.html @@ -0,0 +1,40 @@ + + + + + + + + diff --git a/Base/home/anon/www/welcome.html b/Base/home/anon/www/welcome.html index 880fb86146..db445643f2 100644 --- a/Base/home/anon/www/welcome.html +++ b/Base/home/anon/www/welcome.html @@ -28,6 +28,7 @@ span#ua {

Your user agent is:

Some small test pages: