/** * Draws a line from pointA to pointB on the canvas * with the Bresenham algorithm. * @param {Uint8ClampedArray} data - The linearised pixel array * @param {[number, number]} pointA - The start point of the line * @param {[number, number]} pointB - The end point of the line * @param {number} width - The width of the canvas * @param {number} height - The height of the canvas */ export function bresenham(data: Uint8ClampedArray, pointA: [number, number], pointB: [number, number], width: number, height: number) { // TODO: Adapt the C-implementation at https://de.wikipedia.org/wiki/Bresenham-Algorithmus#C-Implementierung }