backport the changes to render/ from the alttab branch (commit 3592046b2b) in master, as the iconcache changes depend on this

git show 3592046b -- render
This commit is contained in:
Dana Jansens 2008-02-14 14:44:17 -05:00
parent e06ddf9f22
commit 512d93afcc
2 changed files with 19 additions and 4 deletions

View 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;
}

View 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 {