PageSourceSearch

https://yughias.github.io/pages/SuperOthello/js/drawUtility.js

js yughias.github.io collected 2026-10-03 10:13:44 UTC 668 bytes, 37 lines download raw bytes

1// CANVAS DOM AND CONTEXT
2let canvas;
3let ctx;
4
5function clearCanvas(){
6    ctx.clearRect(0, 0, canvas.width, canvas.height);
7}
8
9function fill(string){
10    ctx.fillStyle = string;
11}
12
13function rect(x, y, width, height){
14    ctx.rect(x, y, width, height);
15    ctx.fill();
16    ctx.stroke();
17}
18
19function line(x1, y1, x2, y2){
20    ctx.beginPath();
21    ctx.moveTo(x1, y1);
22    ctx.lineTo(x2, y2);
23    ctx.stroke();
24}
25
26function circle(x, y, radius){
27    ctx.beginPath();
28    ctx.arc(x, y, radius, 0, 2*Math.PI);
29    ctx.fill();
30    ctx.stroke();
31}
32
33function text(string, x, y){
34    ctx.textAlign = "center";
35    ctx.fillText(string, x, y);
36    ctx.strokeText(string, x, y);
37}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.