Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        eimage.c eimage.h icons.c pager.c 


Log Message:
More visual propagation stuff.

===================================================================
RCS file: /cvs/e/e16/e/src/eimage.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- eimage.c    13 May 2006 13:25:30 -0000      1.5
+++ eimage.c    14 May 2006 10:59:30 -0000      1.6
@@ -344,15 +344,23 @@
 }
 
 EImage             *
-EImageGrabDrawableScaled(Drawable draw, Pixmap mask, int x, int y, int w, int 
h,
+EImageGrabDrawableScaled(Win win, Drawable draw, Pixmap mask,
+                        int x, int y, int w, int h,
                         int iw, int ih, int grab, int get_mask_from_shape)
 {
    EImage             *im;
+   Visual             *vis;
 
    imlib_context_set_drawable(draw);
-   im =
-      imlib_create_scaled_image_from_drawable(mask, x, y, w, h, iw, ih, grab,
-                                             get_mask_from_shape);
+   vis = (win) ? WinGetVisual(win) : NULL;
+   if (vis)
+      imlib_context_set_visual(vis);
+
+   im = imlib_create_scaled_image_from_drawable(mask, x, y, w, h, iw, ih, grab,
+                                               get_mask_from_shape);
+
+   if (vis)
+      imlib_context_set_visual(_default_vis);
 
    return im;
 }
@@ -408,7 +416,8 @@
 }
 
 void
-ScaleRect(Window src, Pixmap dst, Pixmap * pdst, int sx, int sy, int sw, int 
sh,
+ScaleRect(Win wsrc, Drawable src, Win wdst, Pixmap dst, Pixmap * pdst,
+         int sx, int sy, int sw, int sh,
          int dx, int dy, int dw, int dh, int scale)
 {
    Imlib_Image        *im;
@@ -416,20 +425,17 @@
 
    scale = (scale) ? 2 : 1;
 
-   imlib_context_set_drawable(src);
-   im = imlib_create_scaled_image_from_drawable(None, sx, sy, sw, sh,
-                                               scale * dw, scale * dh, 0, 0);
-   imlib_context_set_image(im);
+   im = EImageGrabDrawableScaled(wsrc, src, None, sx, sy, sw, sh,
+                                scale * dw, scale * dh, 0, 0);
    imlib_context_set_anti_alias(1);
    if (pdst)
      {
-       imlib_render_pixmaps_for_whole_image_at_size(&pmap, &mask, dw, dh);
+       EImageRenderPixmaps(im, wdst, &pmap, &mask, dw, dh);
        *pdst = pmap;
      }
    else
      {
-       imlib_context_set_drawable(dst);
-       imlib_render_image_on_drawable_at_size(dx, dy, dw, dh);
+       EImageRenderOnDrawable(im, wdst, dst, dx, dy, dw, dh, 0);
      }
    imlib_free_image();
 }
===================================================================
RCS file: /cvs/e/e16/e/src/eimage.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- eimage.h    13 May 2006 13:25:30 -0000      1.4
+++ eimage.h    14 May 2006 10:59:30 -0000      1.5
@@ -71,7 +71,8 @@
 
 EImage             *EImageGrabDrawable(Drawable draw, Pixmap mask,
                                       int x, int y, int w, int h, int grab);
-EImage             *EImageGrabDrawableScaled(Drawable draw, Pixmap mask,
+EImage             *EImageGrabDrawableScaled(Win win,
+                                            Drawable draw, Pixmap mask,
                                             int x, int y, int w, int h,
                                             int iw, int ih, int grab,
                                             int get_mask_from_shape);
@@ -92,7 +93,8 @@
                                                 unsigned char *b,
                                                 unsigned char *a);
 
-void                ScaleRect(Window src, Pixmap dst, Pixmap * pdst,
+void                ScaleRect(Win wsrc, Drawable src,
+                             Win wdst, Pixmap dst, Pixmap * pdst,
                              int sx, int sy, int sw, int sh,
                              int dx, int dy, int dw, int dh, int scale);
 
===================================================================
RCS file: /cvs/e/e16/e/src/icons.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- icons.c     3 May 2006 20:52:15 -0000       1.12
+++ icons.c     14 May 2006 10:59:30 -0000      1.13
@@ -112,14 +112,14 @@
        Pixmap              mask;
 
        mask = EWindowGetShapePixmap(EoGetWin(ewin));
-       im = EImageGrabDrawableScaled(draw, mask, 0, 0, ww, hh, w, h,
-                                     !EServerIsGrabbed(), 0);
+       im = EImageGrabDrawableScaled(EoGetWin(ewin), draw, mask, 0, 0, ww, hh,
+                                     w, h, !EServerIsGrabbed(), 0);
      }
    else
      {
        draw = EoGetXwin(ewin);
-       im = EImageGrabDrawableScaled(draw, None, 0, 0, ww, hh, w, h,
-                                     !EServerIsGrabbed(), 1);
+       im = EImageGrabDrawableScaled(EoGetWin(ewin), draw, None, 0, 0, ww, hh,
+                                     w, h, !EServerIsGrabbed(), 1);
      }
    EImageSetHasAlpha(im, 1);
 
===================================================================
RCS file: /cvs/e/e16/e/src/pager.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -3 -r1.215 -r1.216
--- pager.c     13 May 2006 13:25:30 -0000      1.215
+++ pager.c     14 May 2006 10:59:30 -0000      1.216
@@ -213,16 +213,16 @@
    y = ((phase & 0xfffffff8) + offsets[phase % 8]) % hh;
    y2 = (y * VRoot.h) / hh;
 
-   ScaleRect(VRoot.xwin, p->pmap, NULL, 0, y2, VRoot.w, VRoot.h / hh,
-            xx, yy + y, ww, 1, Conf_pagers.hiq);
+   ScaleRect(VRoot.win, VRoot.xwin, p->win, p->pmap, NULL, 0, y2, VRoot.w,
+            VRoot.h / hh, xx, yy + y, ww, 1, Conf_pagers.hiq);
    EClearArea(p->win, xx, yy + y, ww, 1, False);
    y2 = p->h;
 #else
    y = ((phase & 0xfffffff8) + offsets[phase % 8]) % ww;
    y2 = (y * VRoot.w) / ww;
 
-   ScaleRect(VRoot.xwin, p->pmap, NULL, y2, 0, VRoot.w / ww, VRoot.h,
-            xx + y, yy, 1, hh, Conf_pagers.hiq);
+   ScaleRect(VRoot.win, VRoot.xwin, p->win, p->pmap, NULL, y2, 0, VRoot.w / ww,
+            VRoot.h, xx + y, yy, 1, hh, Conf_pagers.hiq);
    EClearArea(p->win, xx + y, yy, 1, hh, False);
    y2 = p->w;
 #endif
@@ -305,8 +305,9 @@
      {
        ewin->mini_pmm.type = 1;
        ewin->mini_pmm.mask = None;
-       ScaleRect(draw, None, &ewin->mini_pmm.pmap, 0, 0,
-                 EoGetW(ewin), EoGetH(ewin), 0, 0, w, h, Conf_pagers.hiq);
+       ScaleRect(EoGetWin(ewin), draw, VRoot.win, None, &ewin->mini_pmm.pmap,
+                 0, 0, EoGetW(ewin), EoGetH(ewin), 0, 0, w, h,
+                 Conf_pagers.hiq);
      }
 
 #if 0                          /* FIXME - Remove? */
@@ -409,8 +410,9 @@
 
  do_screen_update:
    /* Update pager area by snapshotting entire screen */
-   ScaleRect(VRoot.xwin, p->pmap, NULL, 0, 0, VRoot.w, VRoot.h, cx * p->dw,
-            cy * p->dh, p->dw, p->dh, Conf_pagers.hiq);
+   ScaleRect(VRoot.win, VRoot.xwin, p->win, p->pmap, NULL, 0, 0,
+            VRoot.w, VRoot.h, cx * p->dw, cy * p->dh, p->dw, p->dh,
+            Conf_pagers.hiq);
    p->update_phase = 0;
 
    EClearWindow(p->win);
@@ -542,8 +544,8 @@
 
    if (Conf_pagers.snap && p->dsk->bg.pmap)
      {
-       ScaleRect(p->dsk->bg.pmap, pmap, NULL, 0, 0, VRoot.w, VRoot.h, 0,
-                 0, p->dw, p->dh, Conf_pagers.hiq);
+       ScaleRect(VRoot.win, p->dsk->bg.pmap, p->win, pmap, NULL, 0, 0,
+                 VRoot.w, VRoot.h, 0, 0, p->dw, p->dh, Conf_pagers.hiq);
        return;
      }
 




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to