mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Call _gdk_draw_pixbuf(), thus enabling using this function for pixbufs
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com> * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Call _gdk_draw_pixbuf(), thus enabling using this function for pixbufs with alpha. (#68801) * gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move implementation of gdk_pixbuf_render_to_drawable() to here.
This commit is contained in:
parent
d3b83098ad
commit
ccb9077861
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1,3 +1,13 @@
|
||||
Tue Jan 29 17:40:02 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
|
||||
Call _gdk_draw_pixbuf(), thus enabling using this function
|
||||
for pixbufs with alpha. (#68801)
|
||||
|
||||
* gdk/gdkdraw.c (gdk_drawable_real_draw_pixbuf): Move
|
||||
implementation of gdk_pixbuf_render_to_drawable()
|
||||
to here.
|
||||
|
||||
Tue Jan 29 17:16:17 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtklayout.c: Patch from Jacob Berkman to fix problem
|
||||
|
@ -1289,23 +1289,32 @@ gdk_drawable_real_draw_pixbuf (GdkDrawable *drawable,
|
||||
|
||||
if (composited)
|
||||
{
|
||||
gdk_pixbuf_render_to_drawable (composited,
|
||||
drawable, gc,
|
||||
0, 0,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
x_dither, y_dither);
|
||||
src_x = 0;
|
||||
src_y = 0;
|
||||
pixbuf = composited;
|
||||
}
|
||||
else
|
||||
|
||||
if (pixbuf->n_channels == 4)
|
||||
{
|
||||
gdk_pixbuf_render_to_drawable (pixbuf,
|
||||
drawable, gc,
|
||||
src_x, src_y,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
x_dither, y_dither);
|
||||
guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
|
||||
|
||||
gdk_draw_rgb_32_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, pixbuf->rowstride,
|
||||
x_dither, y_dither);
|
||||
}
|
||||
else /* n_channels == 3 */
|
||||
{
|
||||
guchar *buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
|
||||
gdk_draw_rgb_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, pixbuf->rowstride,
|
||||
x_dither, y_dither);
|
||||
}
|
||||
|
||||
out:
|
||||
|
@ -174,16 +174,12 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
GdkRgbDither dither,
|
||||
int x_dither, int y_dither)
|
||||
{
|
||||
int rowstride;
|
||||
guchar *buf;
|
||||
|
||||
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
|
||||
g_return_if_fail (pixbuf->colorspace == GDK_COLORSPACE_RGB);
|
||||
g_return_if_fail (pixbuf->n_channels == 3 || pixbuf->n_channels == 4);
|
||||
g_return_if_fail (pixbuf->bits_per_sample == 8);
|
||||
|
||||
g_return_if_fail (drawable != NULL);
|
||||
g_return_if_fail (gc != NULL);
|
||||
|
||||
if (width == -1)
|
||||
width = pixbuf->width;
|
||||
@ -197,33 +193,9 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf,
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
/* This will have to be modified once we support other image types.
|
||||
*/
|
||||
|
||||
if (pixbuf->n_channels == 4)
|
||||
{
|
||||
buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
|
||||
rowstride = pixbuf->rowstride;
|
||||
|
||||
gdk_draw_rgb_32_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, rowstride,
|
||||
x_dither, y_dither);
|
||||
}
|
||||
else /* n_channels == 3 */
|
||||
{
|
||||
buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
|
||||
rowstride = pixbuf->rowstride;
|
||||
|
||||
gdk_draw_rgb_image_dithalign (drawable, gc,
|
||||
dest_x, dest_y,
|
||||
width, height,
|
||||
dither,
|
||||
buf, rowstride,
|
||||
x_dither, y_dither);
|
||||
}
|
||||
_gdk_draw_pixbuf (drawable, gc, pixbuf,
|
||||
src_x, src_y, dest_x, dest_y, width, height,
|
||||
dither, x_dither, y_dither);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user