From: Paul Eggert Date: Fri, 3 Dec 2021 17:47:22 +0000 (-0800) Subject: Simplify svg_load_image X-Git-Tag: emacs-29.0.90~3619^2~20 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02386da9389104ca4d4dde875a3fdac36eb10555;p=emacs.git Simplify svg_load_image * src/image.c (svg_load_image): Simplify slightly. --- diff --git a/src/image.c b/src/image.c index f13304912c8..1db2b78ad5b 100644 --- a/src/image.c +++ b/src/image.c @@ -10469,14 +10469,12 @@ svg_load_image (struct frame *f, struct image *img, char *contents, else if (has_width && has_viewbox) { viewbox_width = svg_css_length_to_pixels (iwidth, dpi, img->face_font_size); - viewbox_height = svg_css_length_to_pixels (iwidth, dpi, img->face_font_size) - * viewbox.height / viewbox.width; + viewbox_height = viewbox_width * viewbox.height / viewbox.width; } else if (has_height && has_viewbox) { viewbox_height = svg_css_length_to_pixels (iheight, dpi, img->face_font_size); - viewbox_width = svg_css_length_to_pixels (iheight, dpi, img->face_font_size) - * viewbox.width / viewbox.height; + viewbox_width = viewbox_height * viewbox.width / viewbox.height; } else if (has_viewbox) {