1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-19 11:35:12 +00:00
conky/lua/cairo_imlib2_helper.pkg
Simon Lees 96337be28f Split cairo_draw_image into two functions
In some cases you are already working with a cairo_t and know
your destination image size, this adds an API that allows you
to handle these cases more easily. Along with now being able to
draw images with an alpha level. It also leaves the original API
unchanged.
2024-03-11 16:08:32 -04:00

12 lines
506 B
Plaintext

$#include <cairo.h>
$#include <libcairo_imlib2_helper.h>
/* Paints the image onto the cairo_surface_t */
void cairo_draw_image(const char *, cairo_surface_t *, int, int,
double scale_x=1.0, double scale_y=1.0,
double * return_scale_w, double * return_scale_h);
/* Places an image onto a cairo_t but doesn't call cairo_paint */
void cairo_place_image(const char *file, cairo_t *cr, int x, int y,
int width, int height, double alpha=1.0);