diff --git a/src/xterm.c b/src/xterm.c index b49c9d6..c07bced 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -608,7 +608,9 @@ x_cr_draw_image (struct frame *f, GC gc, cairo_pattern_t *image, int dest_x, int dest_y, bool overlay_p) { cairo_t *cr = x_begin_cr_clip (f, gc); - + int scale = xg_get_scale(f); + width *= scale; + height *= scale; if (overlay_p) cairo_rectangle (cr, dest_x, dest_y, width, height); else @@ -622,6 +624,7 @@ x_cr_draw_image (struct frame *f, GC gc, cairo_pattern_t *image, cairo_surface_t *surface; cairo_pattern_get_surface (image, &surface); + cairo_surface_set_device_scale (surface, 1. / scale, 1. / scale); cairo_format_t format = cairo_image_surface_get_format (surface); if (format != CAIRO_FORMAT_A8 && format != CAIRO_FORMAT_A1) {