From: Dana Jansens Date: Wed, 9 Dec 2009 18:47:38 +0000 (-0500) Subject: RGBA textures were not resized and drawn correctly within their target area. Adresse... X-Git-Tag: mikabox-3.4.7.2~1 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=fe72de2c68afb299b988472c25db532e837b6380;p=mikachu%2Fopenbox.git RGBA textures were not resized and drawn correctly within their target area. Adresses bug #1149 --- diff --git a/render/render.c b/render/render.c index 52cc70ec..c27bfafd 100644 --- a/render/render.c +++ b/render/render.c @@ -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,