23 #ifndef _LAX_LAXIMAGES_CAIRO_H
24 #define _LAX_LAXIMAGES_CAIRO_H
26 #include <lax/laximages.h>
28 #include <cairo/cairo-xlib.h>
43 cairo_surface_t *image;
46 LaxCairoImage(
const char *fname,cairo_surface_t *img=NULL,
const char *npreviewfile=NULL,
47 int maxx=0,
int maxy=0,
char del=0);
49 virtual cairo_surface_t *Image(
int which=0);
50 virtual void doneForNow();
51 virtual unsigned int imagestate();
52 virtual int imagetype() {
return LAX_IMAGE_CAIRO; }
53 virtual int w() {
return width; }
54 virtual int h() {
return height; }
55 virtual int dataw() {
return dwidth; }
56 virtual int datah() {
return dheight; }
59 virtual int createFromData_ARGB8(
int width,
int height,
int stride,
const unsigned char *data);
60 virtual unsigned char *getImageBuffer();
61 virtual int doneWithBuffer(
unsigned char *buffer);
66 int laxcairo_image_type();
69 void laxcairo_image_out_rotated(
LaxImage *image,
aDrawable *win,
int ulx,
int uly,
int urx,
int ury);
70 void laxcairo_image_out_skewed(
LaxImage *image,
aDrawable *win,
int ulx,
int uly,
int urx,
int ury,
int llx,
int lly);
73 LaxImage *load_cairo_image(
const char *filename);
74 LaxImage *load_cairo_image_with_preview(
const char *filename,
const char *previewfile,
int maxx,
int maxy,
char del);
75 int laxcairo_generate_preview(
const char *original,
const char *preview,
const char *format,
int maxw,
int maxh,
int fit);
77 LaxImage *image_from_buffer_cairo(
unsigned char *buffer,
int w,
int h,
int stride);
78 LaxImage *create_new_cairo_image(
int w,
int h);