aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorYuuki Harano2021-02-20 18:00:36 +0900
committerYuuki Harano2021-02-20 18:00:36 +0900
commitbe2e47362b0f933dbc8e300e3d168296b7e2aac4 (patch)
tree3b14e2e66d33566b81cb1d6e8bb04551d95dd2b9 /src/image.c
parent949d3e50ec4ea7723bf14b93b66ad0b72f96f163 (diff)
parentc85c8e7d42ae2a5fc95fa7b14257389d8383b34d (diff)
downloademacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.tar.gz
emacs-be2e47362b0f933dbc8e300e3d168296b7e2aac4.zip
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c13
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
153static void image_disable_image (struct frame *, struct image *); 159static void image_disable_image (struct frame *, struct image *);
154static void image_edge_detection (struct frame *, struct image *, Lisp_Object, 160static 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 ();