gfm.image.image

This module defines the notion of an Image. An Image is simply defined as a 2D array of elements, with methods to set/get those elements.

The Image concept might be the basis of a generic software renderer.

Members

Enums

EdgeMode
enum EdgeMode

EdgeMode defines how images are sampled beyond their boundaries.

Functions

contains
bool contains(I img, int x, int y)
copyRect
void copyRect(I dest, I src)

Performs an image blit from src to dest.

drawHorizontalLine
void drawHorizontalLine(I img, int x1, int x2, int y, P p)

Draws an horizontal line on an Image.

drawPixel
void drawPixel(I img, int x, int y, P p)

Draws a single pixel.

drawRect
void drawRect(I img, int x, int y, int width, int height, P e)

Draws a rectangle outline in an Image.

drawVerticalLine
void drawVerticalLine(I img, int x, int y1, int y2, P p)

Draws a vertical line on an Image.

fillImage
void fillImage(I img, P e)

Fills a whole image with a single element value.

fillRect
void fillRect(I img, int x, int y, int width, int height, P e)

Fills an uniform rectangle area in an Image.

getPixel
I.element_t getPixel(I img, int x, int y, EdgeMode em)

Templates

isImage
template isImage(I)

Test if I is an Image.

Meta