mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-16 10:05:22 +00:00
96337be28f
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.
12 lines
506 B
Plaintext
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);
|