diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-01-06 01:08:10 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-01-06 01:08:10 +0000 |
commit | 65de04cdb8c1fcaffc956a776ac38bc7d9d15c1e (patch) | |
tree | 268ca1b63217ee99c5a5d8cca3bbfeca2f51e638 /gdk-pixbuf/pixops | |
parent | bba95de158351a798c3890af3e8807f868dc5083 (diff) | |
download | gdk-pixbuf-65de04cdb8c1fcaffc956a776ac38bc7d9d15c1e.tar.gz |
Added scaling functions into gtk-doc framework.
2000-01-05 Owen Taylor <otaylor@redhat.com>
* doc/Makefile.am doc/gdk-pixbuf-sections.txt
doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml:
Added scaling functions into gtk-doc framework.
* gdk-pixbuf/gdk-pixbuf-scale.c: Documentation fixes.
* gdk-pixbuf/testpixbuf-scale.c (expose_cb): Simplify a bit.
* gdk-pixbuf/pixops/pixops.c (pixops_composite_color): Return
immediately if scale_x or scale_y is 0.
Diffstat (limited to 'gdk-pixbuf/pixops')
-rw-r--r-- | gdk-pixbuf/pixops/pixops.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c index ac901064e..bfc7c7b51 100644 --- a/gdk-pixbuf/pixops/pixops.c +++ b/gdk-pixbuf/pixops/pixops.c @@ -1322,6 +1322,9 @@ pixops_composite_color (art_u8 *dest_buf, g_return_if_fail (!(dest_channels == 3 && dest_has_alpha)); g_return_if_fail (!(src_channels == 3 && src_has_alpha)); + if (scale_x == 0 || scale_y == 0) + return; + if (!src_has_alpha && overall_alpha == 255) pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, dest_rowstride, dest_channels, dest_has_alpha, @@ -1398,6 +1401,9 @@ pixops_composite (art_u8 *dest_buf, g_return_if_fail (!(dest_channels == 3 && dest_has_alpha)); g_return_if_fail (!(src_channels == 3 && src_has_alpha)); + if (scale_x == 0 || scale_y == 0) + return; + if (!src_has_alpha && overall_alpha == 255) pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1, dest_rowstride, dest_channels, dest_has_alpha, @@ -1478,6 +1484,9 @@ pixops_scale (art_u8 *dest_buf, g_return_if_fail (!(src_channels == 3 && src_has_alpha)); g_return_if_fail (!(src_has_alpha && !dest_has_alpha)); + if (scale_x == 0 || scale_y == 0) + return; + switch (filter_level) { case ART_FILTER_NEAREST: |