aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorJan D2015-04-12 13:42:42 +0200
committerJan D2015-04-12 13:42:42 +0200
commitc744c8a8fc2ddea0f3e7d510f1a3c98876c51c05 (patch)
tree414429ce9272b43cdeb3b23e5aef41e39d538deb /src/xterm.c
parentac00e0a0bf4aac5b2443a7651853f3812251047f (diff)
downloademacs-c744c8a8fc2ddea0f3e7d510f1a3c98876c51c05.tar.gz
emacs-c744c8a8fc2ddea0f3e7d510f1a3c98876c51c05.zip
Handle specified bg in images. Use generic libpng code for PNG:s.
* src/image.c (get_spec_bg_or_alpha_as_argb) (create_cairo_image_surface): New functions when USE_CAIRO. (xpm_load): Call the above functions. Handle XPM without mask when USE_CAIRO. (png_load_body): Handle USE_CAIRO case. (png_load): Remove USE_CAIRO specific fuction, modify png_load_body instead. (jpeg_load_body): Call create_cairo_image_surface. (gif_load, svg_load_image): Handle specified background, call create_cairo_image_surface. * src/xterm.c (x_draw_image_glyph_string): Added missing USE_CAIRO.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index f1632f3141d..aba700d71f2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3167,6 +3167,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
3167 } 3167 }
3168 3168
3169 /* Draw the foreground. */ 3169 /* Draw the foreground. */
3170#ifdef USE_CAIRO
3170 if (s->img->cr_data) 3171 if (s->img->cr_data)
3171 { 3172 {
3172 cairo_t *cr = x_begin_cr_clip (s->f, s->gc); 3173 cairo_t *cr = x_begin_cr_clip (s->f, s->gc);
@@ -3182,7 +3183,9 @@ x_draw_image_glyph_string (struct glyph_string *s)
3182 cairo_fill (cr); 3183 cairo_fill (cr);
3183 x_end_cr_clip (s->f); 3184 x_end_cr_clip (s->f);
3184 } 3185 }
3185 else if (pixmap != None) 3186 else
3187#endif
3188 if (pixmap != None)
3186 { 3189 {
3187 x_draw_image_foreground_1 (s, pixmap); 3190 x_draw_image_foreground_1 (s, pixmap);
3188 x_set_glyph_string_clipping (s); 3191 x_set_glyph_string_clipping (s);