21 #ifdef HAVE_PANGOCAIRO
23 #include <gdk-pixbuf/gdk-pixbuf.h>
24 #include <gdk/gdkcairo.h>
26 #ifdef _WIN32 //*dependencies
27 #pragma comment( lib, "gvc.lib" )
28 #pragma comment( lib, "glib-2.0.lib" )
29 #pragma comment( lib, "cairo.lib" )
30 #pragma comment( lib, "gobject-2.0.lib" )
31 #pragma comment( lib, "graph.lib" )
32 #pragma comment( lib, "gdk-pixbuf.lib" )
46 reader (
void *closure,
unsigned char *
data,
unsigned int length)
48 if (length == fread(data, 1, length, (FILE *)closure)
49 || feof((FILE *)closure))
50 return CAIRO_STATUS_SUCCESS;
51 return CAIRO_STATUS_READ_ERROR;
57 g_object_unref((GdkPixbuf*)(us->
data));
62 GdkPixbuf *image =
NULL;
70 image = (GdkPixbuf*)(us->
data);
87 image = gdk_pixbuf_new_from_file(us->
name,
NULL);
93 us->
data = (
void*)image;
103 cairo_t *cr = (cairo_t *) job->
context;
106 image = gdk_loadimage(job, us);
109 cairo_translate(cr, b.
LL.
x, -b.
UR.
y);
110 cairo_scale(cr, (b.
UR.
x - b.
LL.
x)/(us->
w), (b.
UR.
y - b.
LL.
y)/(us->
h));
111 gdk_cairo_set_source_pixbuf (cr, image, 0, 0);
124 #ifdef HAVE_PANGOCAIRO
125 {FORMAT_BMP_CAIRO,
"bmp:cairo", 1, &engine_gdk,
NULL},
126 {FORMAT_JPEG_CAIRO,
"jpe:cairo", 2, &engine_gdk,
NULL},
127 {FORMAT_JPEG_CAIRO,
"jpg:cairo", 2, &engine_gdk,
NULL},
128 {FORMAT_JPEG_CAIRO,
"jpeg:cairo", 2, &engine_gdk,
NULL},
130 {FORMAT_ICO_CAIRO,
"ico:cairo", 1, &engine_gdk,
NULL},
void(* datafree)(usershape_t *us)
gvplugin_installed_t gvloadimage_gdk_types[]
boolean gvusershape_file_access(usershape_t *us)
void gvusershape_file_release(usershape_t *us)