@new


Description:

public static Pixmap @new (uint8* pixels, int w, int h, Array<Color>? colors)

Build a pixmap from pixels.

The elements of the pixels array are used as indices in colors. This means that pixmaps created this way can use at most 256 colors. NOTE: any color modifiers (GrXOR, GrOR, GrAND) OR-ed to the elements of the color table are ignored.

Parameters:

pixels

a two dimensional array of bytes

w

the width of the pixel array

h

the height of the pixel array

colors

color table for the pixel array

Returns:

a new Pixmap or null if there was an error.