]> Dogcows Code - chaz/openbox/commitdiff
backport the changes to render/ from the alttab branch (commit 3592046b2b26e05ee94c0d...
authorDana Jansens <danakj@orodu.net>
Thu, 14 Feb 2008 19:44:17 +0000 (14:44 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 14 Feb 2008 19:44:17 +0000 (14:44 -0500)
git show 3592046b -- render

render/render.c
render/render.h

index 2813dda0a5ad29f58b944dc21e7652306f50f285..b81e80a69d37bd627b38ea0b9a6ecac2dc6976fd 100644 (file)
@@ -132,10 +132,20 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
             break;
         case RR_TEXTURE_RGBA:
             g_assert(!transferred);
-            RrImageDraw(a->surface.pixel_data,
-                        &a->texture[i].data.rgba,
-                        a->w, a->h,
-                        &tarea);
+            {
+                RrRect narea = tarea;
+                RrTextureRGBA *rgb = &a->texture[i].data.rgba;
+                if (rgb->twidth)
+                    narea.width = MIN(tarea.width, rgb->twidth);
+                if (rgb->theight)
+                    narea.height = MIN(tarea.height, rgb->theight);
+                narea.x += rgb->tx;
+                narea.y += rgb->ty;
+                RrImageDraw(a->surface.pixel_data,
+                            &a->texture[i].data.rgba,
+                            a->w, a->h,
+                            &narea);
+            }
             force_transfer = 1;
         break;
         }
index d9438edc72322518a1bf5c19820d95f617a4d5ed..10eafc6e5724416a61735d680f495181e6ca0602 100644 (file)
@@ -167,6 +167,11 @@ struct _RrTextureRGBA {
     gint cwidth;
     gint cheight;
     RrPixel32 *cache;
+/* size and position to draw at */
+    gint tx;
+    gint ty;
+    gint twidth;
+    gint theight;
 };
 
 struct _RrTextureLineArt {
This page took 0.025815 seconds and 4 git commands to generate.