diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-06-21 20:47:22 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-06-21 20:47:22 +0000 |
commit | 11056f564b04a956fd3428d7257c839a609fd53e (patch) | |
tree | f0ba80f60b9d46230d393b9d39ba132c518da0f0 /gdk/gdkpixbuf-drawable.c | |
parent | 443e8c395e9f45d89f669c944366055eead5d021 (diff) | |
download | gtk+-11056f564b04a956fd3428d7257c839a609fd53e.tar.gz |
Welcome aboard, gdk-pixbuf.
Wed Jun 21 16:38:13 2000 Owen Taylor <otaylor@redhat.com>
* gdk-pixbuf/* docs/reference/gdk-pixbuf/*: Welcome aboard,
gdk-pixbuf.
* gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init):
fixups for GObject.
* gdk/Makefile.am gdk/gdkpixbuf-render.[ch] gdk/gdkpixbuf.[ch]: Bits of
gdk-pixbuf with GDK dependencies moved into GDK.
* gtk/Makefile.am gtk/gdk-pixbuf-loader.[ch]: Temporarily
move gdk-pixbuf-loader here until GObject has signals.
* demos/: New directory of demos. Move demos from
gdk-pixbuf here.
* demos/pixbuf-init.c: Small bit of code to check for
loaders in ../gdk-pixbuf/.libs/gdk-pixbuf, and if found,
set GDK_PIXBUF_MODULEDIR appropriately.
* gdk/gdkcompat.h: Remove GDK_DRAWABLE_PIXMAP compat
define which no longer makes sense.
Diffstat (limited to 'gdk/gdkpixbuf-drawable.c')
-rw-r--r-- | gdk/gdkpixbuf-drawable.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c index 39a85d9a59..955a8f5c5d 100644 --- a/gdk/gdkpixbuf-drawable.c +++ b/gdk/gdkpixbuf-drawable.c @@ -26,6 +26,12 @@ #include <config.h> #include <stdio.h> #include <string.h> +#include "gdk.h" /* For gdk_screen_width/gdk_screen_height */ +#include "gdkcolor.h" +#include "gdkimage.h" +#include "gdkvisual.h" +#include "gdkwindow.h" +#include "gdkpixbuf.h" #include "gdk-pixbuf-private.h" #if (G_BYTE_ORDER == G_LITTLE_ENDIAN) @@ -1082,7 +1088,6 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, int dest_x, int dest_y, int width, int height) { - GdkWindowType window_type; int src_width, src_height; GdkImage *image; int rowstride, bpp, alpha; @@ -1091,9 +1096,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, g_return_val_if_fail (src != NULL, NULL); - window_type = gdk_window_get_type (src); - - if (window_type == GDK_WINDOW_PIXMAP) + if (GDK_IS_PIXMAP (src)) g_return_val_if_fail (cmap != NULL, NULL); else /* FIXME: this is not perfect, since is_viewable() only tests @@ -1113,7 +1116,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, /* Coordinate sanity checks */ - gdk_window_get_size (src, &src_width, &src_height); + gdk_drawable_get_size (src, &src_width, &src_height); g_return_val_if_fail (src_x >= 0 && src_y >= 0, NULL); g_return_val_if_fail (src_x + width <= src_width && src_y + height <= src_height, NULL); @@ -1124,7 +1127,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, g_return_val_if_fail (dest_y + height <= dest->height, NULL); } - if (window_type != GDK_WINDOW_PIXMAP) { + if (!GDK_IS_PIXMAP (src)) { int ret; int src_xorigin, src_yorigin; int screen_width, screen_height; @@ -1158,7 +1161,7 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, } /* Get the colormap if needed */ - if (window_type != GDK_WINDOW_PIXMAP) + if (!GDK_IS_PIXMAP (src)) cmap = gdk_window_get_colormap (src); alpha = dest->has_alpha; |