From: illogict Date: Tue, 31 Aug 2010 08:14:39 +0000 (+0000) Subject: Evas SVG loader: if both width and height scale dimensions are given, we want... X-Git-Tag: accepted/2.0/20130306.225542~242^2~1578 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c49d18d73e542d5c95bcac6c657216d8f3b16b3f;p=profile%2Fivi%2Fevas.git Evas SVG loader: if both width and height scale dimensions are given, we want to use the biggest computed dimensions. 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 --- 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;