diff options
Diffstat (limited to 'testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html')
-rw-r--r-- | testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html new file mode 100644 index 0000000000..c12acbf6f3 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/transformations/canvas_transformations_reset_001.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="match" href="canvas_transformations_reset_001-ref.html"> +<style> + html, body { + margin: 0; + padding: 0; + } +</style> +<canvas id="c" width="150" height="150"></canvas> +<script> +var c = document.getElementById("c"); +var ctx = c.getContext("2d"); + +ctx.translate(75, 75); +ctx.fillStyle = 'blue'; +ctx.fillRect(0, 0, 75, 75); + +ctx.resetTransform(); +ctx.fillStyle = 'red'; +ctx.fillRect(0, 0, 75, 75); +</script> |