testing/web-platform/tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Wed, 25 May 2022 18:56:29 +0000
changeset 618847 fb0c469ac2fb9ed647bb174a047ea396f472adaf
parent 529326 d4e1e62aed03db1d447f6b31b8d1347c2ad2e43b
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD cy -> 18a3618fb08f9f3d0e6f5e3b4204193f154d6c98 es-AR -> d5f750233cd6e462d5170d396d5cd51f0ee64e81 eu -> 89eb1d19cbc2092da7c92305075e65b32cd4512d fi -> a4cac829965a4562b98df47ac5a5f3fe31a35fbf fr -> 906fdc5ffdd0eba897ab0796422a61e2d325640a fy-NL -> 5b22201eded974b72789b1974623023c84286948 it -> ed918e4ee4ab3b3f6f421c816eb4fcf32f76330f nl -> 52db668d98e87cff8c22b4448a50230aa05029b1 rm -> 12e718da5d7b059ba9dc4a18f56990a5adfc8658 ru -> 233a1c00ee183d01ca8592ddd3df434159ba1b8b

<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.line.miter.obtuse</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
<body class="show_output">

<h1>2d.line.miter.obtuse</h1>
<p class="desc">Miter joins are drawn correctly with obtuse angles</p>


<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("Miter joins are drawn correctly with obtuse angles");
_addTest(function(canvas, ctx) {

ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);

ctx.lineWidth = 1600;
ctx.lineJoin = 'miter';

ctx.strokeStyle = '#0f0';
ctx.miterLimit = 1.083;
ctx.beginPath();
ctx.moveTo(800, 10000);
ctx.lineTo(800, 300);
ctx.lineTo(10000, -8900);
ctx.stroke();

ctx.strokeStyle = '#f00';
ctx.miterLimit = 1.082;
ctx.beginPath();
ctx.moveTo(800, 10000);
ctx.lineTo(800, 300);
ctx.lineTo(10000, -8900);
ctx.stroke();

_assertPixel(canvas, 1,1, 0,255,0,255, "1,1", "0,255,0,255");
_assertPixel(canvas, 48,1, 0,255,0,255, "48,1", "0,255,0,255");
_assertPixel(canvas, 48,48, 0,255,0,255, "48,48", "0,255,0,255");
_assertPixel(canvas, 1,48, 0,255,0,255, "1,48", "0,255,0,255");


});
</script>