bx-lib : the Basic X11 Library tuned for C beginners
1.0
|
Functions | |
void | bx_free_image (bx_image image) |
bx_image | bx_load_image (int transp, char const name[]) |
bx_image | bx_load_image_f (int transp, char const format[],...) |
unsigned | bx_image_width (bx_image image) |
unsigned | bx_image_height (bx_image image) |
void | bx_flip_image (bx_image image, int xflip, int yflip) |
void | bx_draw_image (bx_window win, bx_image image, int x, int y) |
void | bx_draw_image_fx (bx_window win, bx_image image, int x, int y, bx_effect fx) |
void bx_free_image | ( | bx_image | image | ) |
Free the memory allocated by a loaded image.
image | the image to be freed. |
bx_image bx_load_image | ( | int | transp, |
char const | name[] | ||
) |
Loads an image from a file (jpg, gif, png, ...)
transp | whether the image is fully opaque (zero) or has some transparency information (non zero). |
name | the path and filename of the image. |
bx_image bx_load_image_f | ( | int | transp, |
char const | format[], | ||
... | |||
) |
Loads an image from a file (jpg, gif, png, ...) just as bx_load_image() but with a printf()-like format to specify the path to the file.
transp | whether the image is fully opaque (zero) or has some transparency information (non zero). |
format | printf()-like format string yielding the path to the image. |
... | the arguments corresponding to the %-pecifiers of the format. |
unsigned bx_image_width | ( | bx_image | image | ) |
Gets the width of the loaded image in pixels.
image | the image whose size is queried |
unsigned bx_image_height | ( | bx_image | image | ) |
Gets the height of the loaded image in pixels.
image | the image whose size is queried |
void bx_flip_image | ( | bx_image | image, |
int | xflip, | ||
int | yflip | ||
) |
Sets the image in a horizontal/vertical mirrored state with respect to the image state at loading time.
xflip | boolean stating if the image should be displayed x-mirrored |
yflip | boolean stating if the image should be displayed y-mirrored |
Draws an image on the canvas of a window.
win | the window owning the targeted canvas. |
image | the image to draw on the canvas |
x,y | the position of tha anchor of the image on the canvas, that is, its top left corner |
Draws an image on the canvas of a window, eventually combining the backgound of the canvas and the image with 1 special effect among 16.
win | the window owning the targeted canvas. |
image | the image to draw on the canvas. |
x,y | the position of thr anchor of the image on the canvas, that is, its top left corner. |
fx | the special effect to apply, in the range from 0 to 15, see bx_effect for available effects. |