diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-14 14:44:17 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-02-14 14:44:17 -0500 |
| commit | 512d93afcc3e7dd5caa42cdb69508964c6338f3d (patch) | |
| tree | d32d92f220408fef3950579684ea2c9a794c7eb5 /render | |
| parent | e06ddf9f22bca1aefd4e6664aa54eea13543aade (diff) | |
backport the changes to render/ from the alttab branch (commit 3592046b2b26e05ee94c0dd0fed5b7fd5475c198) in master, as the iconcache changes depend on this
git show 3592046b -- render
Diffstat (limited to 'render')
| -rw-r--r-- | render/render.c | 18 | ||||
| -rw-r--r-- | render/render.h | 5 |
2 files changed, 19 insertions, 4 deletions
diff --git a/render/render.c b/render/render.c index 2813dda0..b81e80a6 100644 --- a/render/render.c +++ b/render/render.c @@ -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; } diff --git a/render/render.h b/render/render.h index d9438edc..10eafc6e 100644 --- a/render/render.h +++ b/render/render.h @@ -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 { |
