From fe72de2c68afb299b988472c25db532e837b6380 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 9 Dec 2009 13:47:38 -0500 Subject: [PATCH] RGBA textures were not resized and drawn correctly within their target area. Adresses bug #1149 --- render/render.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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, -- 2.34.1