diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-12-27 20:31:32 +0000 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-12-27 20:31:32 +0000 |
commit | 58c55a0f038c95a7245fd58dc66b494c5b666a7e (patch) | |
tree | ba0c5ca8c3fa6960cd99e7cdc3ff3a63e3cfe0a3 /src/render.c | |
parent | e8c7ca3bbc48da3d9806b92abb3827e331594eee (diff) |
Use Cairo surfaces for storing images
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render.c b/src/render.c index cacbc54..e02c9ec 100644 --- a/src/render.c +++ b/src/render.c @@ -63,7 +63,7 @@ static void render_glyph_box(cairo_t *cr, struct wrap_box *box) static void render_image_box(cairo_t *cr, struct wrap_box *box, ImageStore *is, enum is_size isz) { - GdkPixbuf *pixbuf; + cairo_surface_t *surf; double w, h; int wi; double ascd; @@ -91,16 +91,16 @@ static void render_image_box(cairo_t *cr, struct wrap_box *box, ImageStore *is, wi = lrint(w); - pixbuf = lookup_image(is, box->filename, wi, isz); + surf = lookup_image(is, box->filename, wi, isz); //show_imagestore(is); - if ( pixbuf == NULL ) { + if ( surf == NULL ) { cairo_set_source_rgba(cr, 1.0, 0.0, 0.0, 1.0); fprintf(stderr, "Failed to load '%s' at size %i\n", box->filename, wi); } else { cairo_identity_matrix(cr); - gdk_cairo_set_source_pixbuf(cr, pixbuf, x, y); + cairo_set_source_surface(cr, surf, x, y); } cairo_fill(cr); |