Pixmap

Pixel data container

Constructors

this
this(Size size)
this
this(int width, int height)
this
this(Pixel[] data, int width)

Members

Functions

clear
void clear(Pixel value)

Clears the buffer’s contents (by setting each pixel to the same color)

clone
Pixmap clone()

Creates a deep clone of the Pixmap

height
int height()

Height of the buffer, i.e. the number of lines

length
int length()

Length of the buffer, i.e. the number of pixels

pitch
int pitch()

Number of bytes per line

size
void size(Size value)
void size(int totalPixels, int width)

Changes the size of the buffer

size
Size size()

Rectangular size of the buffer

sliceAt
inout(Pixel)[] sliceAt(Point pos, int n)

Retrieves a linear slice of the pixmap.

Static functions

fromMemoryImage
Pixmap fromMemoryImage(MemoryImage source)

Creates a Pixmap wrapping the pixel data from the provided MemoryImage.

fromTrueColorImage
Pixmap fromTrueColorImage(TrueColorImage source)

Creates a Pixmap wrapping the pixel data from the provided TrueColorImage.

Variables

data
Pixel[] data;

Pixel data

width
int width;

Pixel per row

Meta