MUAN
|
This file implements the methods about an Image. More...
Functions | |
Image * | img_create (int w, int h) |
Creates a new image. | |
void | img_free (Image *i) |
Frees an image. | |
void | img_clear (Image *i, Bcolor c) |
Clears an image with a color. | |
void | img_putc (Image *i, int u, int v, Bcolor c) |
Sets a pixel on the image using color. | |
Bcolor | img_getc (Image *i, int u, int v) |
Gets the color of a pixel on the image. | |
Bcolor | c_make (Byte x, Byte y, Byte z) |
This file implements the methods about an Image.
Bcolor c_make | ( | Byte | x, |
Byte | y, | ||
Byte | z | ||
) |
References Bcolor::b, Bcolor::g, and Bcolor::r.
Referenced by copy_image(), and img_getc().
Clears an image with a color.
i | The image to clear |
c | The color to fill. |
References Image::h, img_putc(), and Image::w.
Image* img_create | ( | int | w, |
int | h | ||
) |
Creates a new image.
type | The Image type: IMG_TRUECOL, IMG_MAPPCOL, IMG_MONOCOL. |
w | The Image width. |
h | The Image height. |
References Image::c, Image::h, and Image::w.
Referenced by VideoEncoder::jpg_write(), and video_getframe().
void img_free | ( | Image * | i | ) |
Gets the color of a pixel on the image.
References c_make().
Sets a pixel on the image using color.
Referenced by copy_image(), and img_clear().