diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-10-28 16:13:49 +0000 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-10-28 16:13:49 +0000 |
commit | 941167e6d8dcb46104c4463c2486bc2c9c16d294 (patch) | |
tree | b34158aecedfe110962aa927f8521d94647814ab /gdk/gdkpixbuf-render.c | |
parent | 5a8b538ee199f1f9dbcd3b6f68e5753c0ef03170 (diff) | |
download | gdk-pixbuf-941167e6d8dcb46104c4463c2486bc2c9c16d294.tar.gz |
Sync to desktop - Federico
Diffstat (limited to 'gdk/gdkpixbuf-render.c')
-rw-r--r-- | gdk/gdkpixbuf-render.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdk/gdkpixbuf-render.c b/gdk/gdkpixbuf-render.c index 3f02f6936..87f508c40 100644 --- a/gdk/gdkpixbuf-render.c +++ b/gdk/gdkpixbuf-render.c @@ -133,6 +133,8 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable, ArtIRect dest_rect, req_rect, area_rect; GdkBitmap *bitmap; GdkGC *gc; + guchar *buf; + int rowstride; g_return_if_fail (pixbuf != NULL); apb = pixbuf->art_pixbuf; @@ -163,5 +165,13 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable, gdk_gc_set_clip_origin (gc, dest_x, dest_y); } - + /* Sigh, GdkRGB does not have gdk_draw_rgb_32_image_dithalign(), so we + * have to pack the buffer first. + */ + if (apb->has_alpha) + buf = remove_alpha (apb, src_x, src_y, width, height, &rowstride); + else { + buf = apb->pixels + src_y * apb->rowstride + src_x * 3; + rowstride = apb->rowstride; + } } |