Enlightenment CVS committal

Author  : zuluone
Project : e17
Module  : apps/entice

Dir     : e17/apps/entice/src/bin


Modified Files:
        image.c 


Log Message:
fixed fit to window to work even if the window is wider than it is high and the image 
is higher than it is wide (or vice-versa)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/entice/src/bin/image.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- image.c     9 Nov 2003 23:12:26 -0000       1.34
+++ image.c     26 Nov 2003 20:15:16 -0000      1.35
@@ -336,7 +336,7 @@
            break;
         default:
 #if DEBUG
-           fprintf(stderr, "SCrolling WTF\n");
+           fprintf(stderr, "Scrolling WTF\n");
 #endif
            break;
       }
@@ -388,10 +388,16 @@
 
    if ((im = evas_object_smart_data_get(o)))
    {
+      double wfactor, hfactor;
+      wfactor = (double) (im->iw) / (double) (im->w);
+      hfactor = (double) (im->ih) / (double) (im->h);
+      /*
       if (im->iw > im->ih)
          im->zoom = ((double) (im->iw) / (double) im->w);
       else
          im->zoom = ((double) (im->ih) / (double) im->h);
+        */
+      im->zoom = (wfactor > hfactor ? wfactor : hfactor);
       im->fit = 1;
       entice_image_resize(o, im->w, im->h);
    }




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to