From 9075dea3a8c054dbc03d56ccecbfb2bd3fa54e5e Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Thu, 11 Aug 2022 17:44:58 +0100 Subject: [PATCH] Base: Add a test page for Path2D Neither of the tests here actually passes properly right now. It's a little more aspirational... In the first one, the circle draws in the wrong place due apparently to existing bugs in `CanvasRenderingContext2D::ellipse()`. In the second, I just haven't yet implemented creating a Path2D from an SVG path string, because that's going to take a fair bit of untangling first. --- Base/res/html/misc/canvas-path2d.html | 40 +++++++++++++++++++++++++++ Base/res/html/misc/welcome.html | 1 + 2 files changed, 41 insertions(+) create mode 100644 Base/res/html/misc/canvas-path2d.html diff --git a/Base/res/html/misc/canvas-path2d.html b/Base/res/html/misc/canvas-path2d.html new file mode 100644 index 0000000000..3531e5dde9 --- /dev/null +++ b/Base/res/html/misc/canvas-path2d.html @@ -0,0 +1,40 @@ + + + + + Path2D test + + +

Path2D test

+

These examples are taken from MDN.

+ +

Basic example

+

Should be a square and a circle, both as outlines.

+ + +

SVG Path example

+

Should display a filled black square.

+ + + + + diff --git a/Base/res/html/misc/welcome.html b/Base/res/html/misc/welcome.html index fd5a83e861..0ff3d086e8 100644 --- a/Base/res/html/misc/welcome.html +++ b/Base/res/html/misc/welcome.html @@ -178,6 +178,7 @@
  • canvas drawImage() test
  • canvas path house!
  • canvas + trigonometry functions
  • +
  • Path2D
  • WebGL Demo - Multiple Contexts and glClear(Color)
  • Wasm

  • WebAssembly Mandelbrot Rendering Demo