Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/modules/engines/fb


Modified Files:
        evas_outbuf.c 


Log Message:


rotation patches for 180 degrees - thankyoooo! :)

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/modules/engines/fb/evas_outbuf.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- evas_outbuf.c       14 Jan 2006 12:13:37 -0000      1.1
+++ evas_outbuf.c       2 Mar 2007 14:51:17 -0000       1.2
@@ -40,11 +40,9 @@
      return NULL;
 
    fb_init(vt_no, dev_no);
-   if (rot == 0)
+   if (rot == 0 || rot == 180)
      buf->priv.fb.fb = fb_setmode(w, h, fb_depth, refresh);
-   else if (rot == 270)
-     buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh);
-   else if (rot == 90)
+   else if (rot == 90 || rot == 270)
      buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh);
    if (!buf->priv.fb.fb) buf->priv.fb.fb = fb_getmode();
    if (!buf->priv.fb.fb)
@@ -54,17 +52,12 @@
      }
    fb_fd = fb_postinit(buf->priv.fb.fb);
 
-   if (rot == 0)
+   if (rot == 0 || rot == 180)
      {
        buf->w = buf->priv.fb.fb->width;
        buf->h = buf->priv.fb.fb->height;
      }
-   else if (rot == 270)
-     {
-       buf->w = buf->priv.fb.fb->height;
-       buf->h = buf->priv.fb.fb->width;
-     }
-   else if (rot == 90)
+   else if (rot == 90 || rot == 270)
      {
        buf->w = buf->priv.fb.fb->height;
        buf->h = buf->priv.fb.fb->width;
@@ -88,7 +81,7 @@
          buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i));
 
        conv_func = NULL;
-       if (buf->rot == 0)
+       if (buf->rot == 0 || buf->rot == 180)
          conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
                                       buf->priv.fb.fb->fb_var.bits_per_pixel,
                                       buf->priv.mask.r,
@@ -96,15 +89,7 @@
                                       buf->priv.mask.b,
                                       PAL_MODE_NONE,
                                       buf->rot);
-       else if (buf->rot == 270)
-         conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
-                                      buf->priv.fb.fb->fb_var.bits_per_pixel,
-                                      buf->priv.mask.r,
-                                      buf->priv.mask.g,
-                                      buf->priv.mask.b,
-                                      PAL_MODE_NONE,
-                                      buf->rot);
-       else if (buf->rot == 90)
+       else if (buf->rot == 90 || buf->rot == 270)
          conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
                                       buf->priv.fb.fb->fb_var.bits_per_pixel,
                                       buf->priv.mask.r,
@@ -163,6 +148,16 @@
                                          buf->priv.mask.b, PAL_MODE_NONE,
                                          buf->rot);
          }
+        else if (buf->rot == 180)
+          {
+             data = (DATA8 *)buf->priv.fb.fb->mem + 
buf->priv.fb.fb->mem_offset +
+               buf->priv.fb.fb->bpp *
+               (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width));
+             conv_func = evas_common_convert_func_get(data, w, h, 
buf->priv.fb.fb->fb_var.bits_per_pixel,
+                                          buf->priv.mask.r, buf->priv.mask.g,
+                                          buf->priv.mask.b, PAL_MODE_NONE,
+                                          buf->rot);
+          }
        else if (buf->rot == 270)
          {
             data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset 
+
@@ -188,7 +183,7 @@
             DATA32 *src_data;
 
             src_data = buf->priv.back_buf->image->data + (y * buf->w) + x;
-            if (buf->rot == 0)
+            if (buf->rot == 0 || buf->rot == 180)
               {
                  conv_func(src_data, data,
                            buf->w - w,
@@ -196,15 +191,7 @@
                            w, h,
                            x, y, NULL);
               }
-            else if (buf->rot == 270)
-              {
-                 conv_func(src_data, data,
-                           buf->w - w,
-                           buf->priv.fb.fb->width - h,
-                           h, w,
-                           x, y, NULL);
-              }
-            else if (buf->rot == 90)
+            else if (buf->rot == 90 || buf->rot == 270)
               {
                  conv_func(src_data, data,
                            buf->w - w,
@@ -277,6 +264,18 @@
                                          buf->priv.mask.b, PAL_MODE_NONE,
                                          buf->rot);
          }
+        else if (buf->rot == 180)  
+          {
+             data = (DATA8 *)buf->priv.fb.fb->mem +
+               buf->priv.fb.fb->mem_offset +
+               buf->priv.fb.fb->bpp *  
+               (buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width));
+             conv_func = evas_common_convert_func_get(data, w, h,
+                                          
buf->priv.fb.fb->fb_var.bits_per_pixel,
+                                          buf->priv.mask.r, buf->priv.mask.g,
+                                          buf->priv.mask.b, PAL_MODE_NONE,
+                                          buf->rot);
+          }
        else if (buf->rot == 270)
          {
             data = (DATA8 *)buf->priv.fb.fb->mem +
@@ -306,7 +305,7 @@
             DATA32 *src_data;
 
             src_data = update->image->data;
-            if (buf->rot == 0)
+            if (buf->rot == 0 || buf->rot == 180)
               {
                  conv_func(src_data, data,
                            0,
@@ -314,15 +313,7 @@
                            w, h,
                            x, y, NULL);
               }
-            else if (buf->rot == 270)
-              {
-                 conv_func(src_data, data,
-                           0,
-                           buf->priv.fb.fb->width - h,
-                           h, w,
-                           x, y, NULL);
-              }
-            else if (buf->rot == 90)
+            else if (buf->rot == 90 || buf->rot == 270)
               {
                  conv_func(src_data, data,
                            0,



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to