From c49d18d73e542d5c95bcac6c657216d8f3b16b3f Mon Sep 17 00:00:00 2001 From: illogict Date: Tue, 31 Aug 2010 08:14:39 +0000 Subject: [PATCH] Evas SVG loader: if both width and height scale dimensions are given, we want to use the biggest computed dimensions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes some ugly views if width and height factors are too much different. See r51774. Thank you Cédric! git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@51775 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/loaders/svg/evas_image_load_svg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/loaders/svg/evas_image_load_svg.c b/src/modules/loaders/svg/evas_image_load_svg.c index 29e433c..6951e61 100644 --- a/src/modules/loaders/svg/evas_image_load_svg.c +++ b/src/modules/loaders/svg/evas_image_load_svg.c @@ -110,8 +110,11 @@ evas_image_load_file_head_svg(Image_Entry *ie, const char *file, const char *key h2 = (ie->load_opts.w * h) / w; if (h2 > ie->load_opts.h) { + int w3; h2 = ie->load_opts.h; - w2 = (ie->load_opts.h * w) / h; + w3 = (ie->load_opts.h * w) / h; + if (w3 > w2) + w2 = w3; } w = w2; h = h2; -- 2.7.4