@rshaker/canvas-calc
v0.1.7
Published
A library of functions for Node and browser environments.
Readme
canvas-calc
Functions for calculating the interactions of polygons with a rectangular canvas.
// Example usage:
const canvasWidth = 100;
const canvasHeight = 100;
const polygons: Polygon[] = [
{
points: [
{ x: 10, y: 10 },
{ x: 20, y: 10 },
{ x: 20, y: 20 },
{ x: 10, y: 20 }
]
},
// Add more polygons as needed
];
const uncoveredCoordinates = findUncoveredCoordinates(canvasWidth, canvasHeight, polygons);
console.log(uncoveredCoordinates);