Evas SVG loader: if both width and height scale dimensions are given, we want...
authorillogict <illogict@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Aug 2010 08:14:39 +0000 (08:14 +0000)
committerillogict <illogict@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Aug 2010 08:14:39 +0000 (08:14 +0000)
   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

index 29e433c..6951e61 100644 (file)
@@ -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;