1/** 2 * Paint a transparency-checkerboard pattern across the given canvas 3 * context. The editor uses this beneath every layer pass so empty 4 * (transparent) areas of the document are visible. 5 * 6 * Pure function â depends only on its arguments. 7 * 8 * @param {CanvasRenderingContext2D} ctx 9 * @param {number} w Width in canvas pixels. 10 * @param {number} h Height in canvas pixels. 11 */ 12export function drawCheckerboard(ctx, w, h) { 13 const size = 10; 14 ctx.fillStyle = '#ccc'; 15 ctx.fillRect(0, 0, w, h); 16 ctx.fillStyle = '#fff'; 17 for (let y = 0; y < h; y += size) { 18 for (let x = 0; x < w; x += size) { 19 if ((Math.floor(x / size) + Math.floor(y / size)) % 2 === 0) { 20 ctx.fillRect(x, y, size, size); 21 } 22 } 23 } 24}
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.