Represents a scanline, a row of pixels running across a bitmap.

Constructor

inline new (y:Int, x1:Int, x2:Int)

Creates a new scanline.

Parameters:

y

The y-coordinate.

x1

The leftmost x-coordinate.

x2

The rightmost x-coordinate.

Variables

read onlyx1:Int

The leftmost x-coordinate of the scanline.

read onlyx2:Int

The rightmost x-coordinate of the scanline.

read onlyy:Int

The y-coordinate of the scanline.

Static methods

statictrim (scanlines:Array<Scanline>, w:Int, h:Int):Array<Scanline>

Crops the scanning width of an array of scanlines so they do not scan outside of the given area.

Parameters:

scanlines

The scanlines to crop.

w

The width to crop.

h

The height to crop.

Returns:

Array of the cropped scanlines.