Class: PixelBuffer

algo.core. PixelBuffer

new PixelBuffer()

Very simple pixel buffer data structure. Works with the algo.layout.PixelViewer class. This class is design for extremely low resolution buffers for demonstrating things like Bresenham's line drawing algorithms for example
Source:

Methods

clear()

reset/clear the entire buffer
Source:

clearPixel(x, y)

reset pixel value at x, y
Parameters:
Name Type Description
x number
y number
Source:

getPixel(x, y)

get pixel value at x, y
Parameters:
Name Type Description
x number
y number
Source:

setPixel(x, y, v)

set pixel value at x, y
Parameters:
Name Type Description
x number
y number
v algo.Color | Object either an algo.Color object or something that can be used to construct one.
Source: