Canvas: added lineTo().

This commit is contained in:
Mátyás Mustoha 2015-02-18 12:46:54 +01:00
parent fed878710c
commit 774cc4a93a
14 changed files with 60 additions and 45 deletions

View file

@ -251,5 +251,6 @@ fragment=top != ../html/acid2.html acid2_ref.html
== text_align_complex_a.html text_align_complex_ref.html
== percentage_height_root.html percentage_height_root_ref.html
== canvas_transform_a.html canvas_transform_ref.html
== canvas_lineto_a.html canvas_lineto_ref.html
!= text_decoration_smoke_a.html text_decoration_smoke_ref.html
== hide_after_create.html hide_after_create_ref.html

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<body>
<style>
html, body {
margin: 0;
padding: 0;
}
</style>
<canvas id="c" width="150" height="150" >
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("c");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20, 20);
ctx.lineTo(20, 130);
ctx.lineTo(130, 130);
ctx.lineTo(130, 20);
ctx.closePath();
ctx.fillStyle = '#90EE90';
ctx.fill();
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
}
div {
background: #90EE90;
width: 110px;
height: 110px;
margin: 20px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>

View file

@ -1,5 +0,0 @@
[2d.path.fill.closed.basic.html]
type: testharness
[Canvas test: 2d.path.fill.closed.basic]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.path.fill.winding.add.html]
type: testharness
[Canvas test: 2d.path.fill.winding.add]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.path.fill.winding.subtract.1.html]
type: testharness
[Canvas test: 2d.path.fill.winding.subtract.1]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.path.fill.winding.subtract.2.html]
type: testharness
[Canvas test: 2d.path.fill.winding.subtract.2]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.path.fill.winding.subtract.3.html]
type: testharness
[Canvas test: 2d.path.fill.winding.subtract.3]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.transformation.setTransform.skewed.html]
type: testharness
[Canvas test: 2d.transformation.setTransform.skewed]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.transformation.transform.skewed.html]
type: testharness
[transform() with skewy matrix transforms correctly]
expected: FAIL

View file

@ -7116,9 +7116,6 @@
[CanvasRenderingContext2D interface: attribute direction]
expected: FAIL
[CanvasRenderingContext2D interface: operation lineTo(unrestricted double,unrestricted double)]
expected: FAIL
[CanvasRenderingContext2D interface: operation quadraticCurveTo(unrestricted double,unrestricted double,unrestricted double,unrestricted double)]
expected: FAIL
@ -7377,12 +7374,6 @@
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "direction" with the proper type (69)]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "lineTo" with the proper type (72)]
expected: FAIL
[CanvasRenderingContext2D interface: calling lineTo(unrestricted double,unrestricted double) on document.createElement("canvas").getContext("2d") with too few arguments must throw TypeError]
expected: FAIL
[CanvasRenderingContext2D interface: document.createElement("canvas").getContext("2d") must inherit property "quadraticCurveTo" with the proper type (73)]
expected: FAIL