diff options
Diffstat (limited to 'src/image.c')
| -rw-r--r-- | src/image.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/image.c b/src/image.c index 09370fa833d..62bca41f899 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -150,6 +150,12 @@ typedef struct pgtk_bitmap_record Bitmap_Record; | |||
| 150 | # define COLOR_TABLE_SUPPORT 1 | 150 | # define COLOR_TABLE_SUPPORT 1 |
| 151 | #endif | 151 | #endif |
| 152 | 152 | ||
| 153 | #if defined HAVE_NS | ||
| 154 | # define FRAME_SCALE_FACTOR(f) ns_frame_scale_factor (f) | ||
| 155 | #else | ||
| 156 | # define FRAME_SCALE_FACTOR(f) 1; | ||
| 157 | #endif | ||
| 158 | |||
| 153 | static void image_disable_image (struct frame *, struct image *); | 159 | static void image_disable_image (struct frame *, struct image *); |
| 154 | static void image_edge_detection (struct frame *, struct image *, Lisp_Object, | 160 | static void image_edge_detection (struct frame *, struct image *, Lisp_Object, |
| 155 | Lisp_Object); | 161 | Lisp_Object); |
| @@ -2330,8 +2336,8 @@ image_set_transform (struct frame *f, struct image *img) | |||
| 2330 | /* SVGs are pre-scaled to the correct size. */ | 2336 | /* SVGs are pre-scaled to the correct size. */ |
| 2331 | if (EQ (image_spec_value (img->spec, QCtype, NULL), Qsvg)) | 2337 | if (EQ (image_spec_value (img->spec, QCtype, NULL), Qsvg)) |
| 2332 | { | 2338 | { |
| 2333 | width = img->width; | 2339 | width = img->width / FRAME_SCALE_FACTOR (f); |
| 2334 | height = img->height; | 2340 | height = img->height / FRAME_SCALE_FACTOR (f); |
| 2335 | } | 2341 | } |
| 2336 | else | 2342 | else |
| 2337 | #endif | 2343 | #endif |
| @@ -10148,6 +10154,9 @@ svg_load_image (struct frame *f, struct image *img, char *contents, | |||
| 10148 | compute_image_size (viewbox_width, viewbox_height, img->spec, | 10154 | compute_image_size (viewbox_width, viewbox_height, img->spec, |
| 10149 | &width, &height); | 10155 | &width, &height); |
| 10150 | 10156 | ||
| 10157 | width *= FRAME_SCALE_FACTOR (f); | ||
| 10158 | height *= FRAME_SCALE_FACTOR (f); | ||
| 10159 | |||
| 10151 | if (! check_image_size (f, width, height)) | 10160 | if (! check_image_size (f, width, height)) |
| 10152 | { | 10161 | { |
| 10153 | image_size_error (); | 10162 | image_size_error (); |