summaryrefslogtreecommitdiff
path: root/gdk/gdkpixbuf-drawable.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-08-27 17:05:48 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:11:30 +0200
commitf74f9b276658b2c4cdcaca4b19e7c860e70e0491 (patch)
treee06b49e3d25fb3314a5390945b6633ea9c234829 /gdk/gdkpixbuf-drawable.c
parentcadcd029a1dad1d508fb0019d7e4697ac2513d51 (diff)
downloadgtk+-f74f9b276658b2c4cdcaca4b19e7c860e70e0491.tar.gz
gdk: Remove GdkPixmap
All iusers of it are gone, so it's now time to let go. cairo_surface_t is a full replacement, combined with gdk_window_create_similar_surface().
Diffstat (limited to 'gdk/gdkpixbuf-drawable.c')
-rw-r--r--gdk/gdkpixbuf-drawable.c30
1 files changed, 2 insertions, 28 deletions
diff --git a/gdk/gdkpixbuf-drawable.c b/gdk/gdkpixbuf-drawable.c
index be99f42adf..6cc35fc969 100644
--- a/gdk/gdkpixbuf-drawable.c
+++ b/gdk/gdkpixbuf-drawable.c
@@ -28,7 +28,6 @@
#include "gdkcolor.h"
#include "gdkwindow.h"
#include "gdkpixbuf.h"
-#include "gdkpixmap.h"
#include "gdkinternals.h"
@@ -53,14 +52,8 @@
*
* If the drawable @src has no colormap (gdk_drawable_get_colormap()
* returns %NULL), then a suitable colormap must be specified.
- * Typically a #GdkWindow or a pixmap created by passing a #GdkWindow
- * to gdk_pixmap_new() will already have a colormap associated with
- * it. If the drawable has a colormap, the @cmap argument will be
- * ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
- * then a colormap is not required; pixels with a value of 1 are
- * assumed to be white, and pixels with a value of 0 are assumed to be
- * black. For taking screenshots, gdk_colormap_get_system() returns
- * the correct colormap to use.
+ * If the drawable has a colormap, the @cmap argument will be
+ * ignored.
*
* If the specified destination pixbuf @dest is %NULL, then this
* function will create an RGB pixbuf with 8 bits per channel and no
@@ -70,12 +63,6 @@
* and it contains alpha information, then the filled pixels will be
* set to full opacity (alpha = 255).
*
- * If the specified drawable is a pixmap, then the requested source
- * rectangle must be completely contained within the pixmap, otherwise
- * the function will return %NULL. For pixmaps only (not for windows)
- * passing -1 for width or height is allowed to mean the full width
- * or height of the pixmap.
- *
* If the specified drawable is a window, and the window is off the
* screen, then there is no image data in the obscured/offscreen
* regions to be placed in the pixbuf. The contents of portions of the
@@ -106,7 +93,6 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
int dest_x, int dest_y,
int width, int height)
{
- int src_width, src_height;
cairo_surface_t *surface;
int depth;
@@ -155,18 +141,6 @@ gdk_pixbuf_get_from_drawable (GdkPixbuf *dest,
/* Coordinate sanity checks */
- if (GDK_IS_PIXMAP (src))
- {
- gdk_drawable_get_size (src, &src_width, &src_height);
- if (width < 0)
- width = src_width;
- if (height < 0)
- height = 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);
- }
-
surface = _gdk_drawable_ref_cairo_surface (src);
dest = gdk_pixbuf_get_from_surface (dest,
surface,