mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 12:20:00 +01:00
LibWeb: Add tests for ellipses with varying angles and directions
This commit is contained in:
parent
1b8c0cd368
commit
74e12a9c97
|
|
@ -5,7 +5,7 @@
|
|||
image-rendering: pixelated;
|
||||
}
|
||||
</style>
|
||||
<canvas id="canvas" width="125" height="125"></canvas>
|
||||
<canvas id="canvas" width="550" height="325"></canvas>
|
||||
<script>
|
||||
const canvas = document.getElementById("canvas")
|
||||
|
||||
|
|
@ -19,4 +19,19 @@
|
|||
context.ellipse(20,20,15,8,1.2273132071162383,4.1926143018618225,2.8853539230051624);
|
||||
context.stroke();
|
||||
context.fill();
|
||||
|
||||
for (let i = 0; i < 2; i++) {
|
||||
for (let j = -5; j <= 5; j++) {
|
||||
context.beginPath();
|
||||
let x = 25 + (j + 5) * 50;
|
||||
let y = 150 + i * 50;
|
||||
let radius = 20;
|
||||
let startAngle = 0;
|
||||
let endAngle = (Math.PI * j) / 2;
|
||||
let counterclockwise = i == 1;
|
||||
|
||||
context.arc(x, y, radius, startAngle, endAngle, counterclockwise);
|
||||
context.stroke();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 13 KiB |
Loading…
Reference in New Issue
Block a user