RGBA textures were not resized and drawn correctly within their target area. Adresse...
authorDana Jansens <danakj@orodu.net>
Wed, 9 Dec 2009 18:47:38 +0000 (13:47 -0500)
committerMikael Magnusson <mikachu@gmail.com>
Wed, 9 Dec 2009 19:01:44 +0000 (20:01 +0100)
render/render.c

index 52cc70ec222b76675facbbbe91baa185482ff25c..c27bfafd5aee7a5f8b760137f3725b3470db4b0a 100644 (file)
@@ -153,12 +153,14 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
             {
                 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.width -= rgb->tx;
                 narea.y += rgb->ty;
+                narea.height -= rgb->ty;
+                if (rgb->twidth)
+                    narea.width = MIN(narea.width, rgb->twidth);
+                if (rgb->theight)
+                    narea.height = MIN(narea.height, rgb->theight);
                 RrImageDrawRGBA(a->surface.pixel_data,
                                 &a->texture[i].data.rgba,
                                 a->w, a->h,