Blame docs/reference/gdk-pixbuf/html/gdk-pixbuf-X-Drawables-to-Pixbufs.html

Packit a4058c
Packit a4058c
<html>
Packit a4058c
<head>
Packit a4058c
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Packit a4058c
<title>X Drawables to Pixbufs: GDK-PixBuf Reference Manual</title>
Packit a4058c
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
Packit a4058c
<link rel="home" href="index.html" title="GDK-PixBuf Reference Manual">
Packit a4058c
<link rel="up" href="rn01.html" title="API Reference">
Packit a4058c
<link rel="prev" href="gdk-pixbuf-Xlib-Rendering.html" title="Xlib Rendering">
Packit a4058c
<link rel="next" href="gdk-pixbuf-XlibRGB.html" title="XlibRGB">
Packit a4058c
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
Packit a4058c
<link rel="stylesheet" href="style.css" type="text/css">
Packit a4058c
</head>
Packit a4058c
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
Packit a4058c
Packit a4058c
Packit a4058c
Top  | 
Packit a4058c
                  Description
Packit a4058c
Packit a4058c
Home
Packit a4058c
Up
Packit a4058c
Prev
Packit a4058c
Next
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

X Drawables to Pixbufs

Packit a4058c

X Drawables to Pixbufs — Getting parts of an X drawable's image data into a pixbuf.

Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Functions

Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
GdkPixbuf *
Packit a4058c
Packit a4058c
Packit a4058c
gdk_pixbuf_xlib_get_from_drawable ()
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Includes

Packit a4058c
#include <gdk-pixbuf/gdk-pixbuf.h>
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Description

Packit a4058c

The functions in this section allow you to take the image data

Packit a4058c
from an X drawable and dump it into a GdkPixbuf.  This can be
Packit a4058c
used for screenshots and other special effects.  Note that these
Packit a4058c
operations can be expensive, since the image data has to be
Packit a4058c
transferred from the X server to the client program and converted.

Packit a4058c

These functions are analogous to those for the GDK version of

Packit a4058c
&gdk-pixbuf;.

Packit a4058c
Packit a4058c
Packit a4058c

Functions

Packit a4058c
Packit a4058c

gdk_pixbuf_xlib_get_from_drawable ()

Packit a4058c
GdkPixbuf *
Packit a4058c
gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
Packit a4058c
                                   Drawable src,
Packit a4058c
                                   Colormap cmap,
Packit a4058c
                                   Visual *visual,
Packit a4058c
                                   int src_x,
Packit a4058c
                                   int src_y,
Packit a4058c
                                   int dest_x,
Packit a4058c
                                   int dest_y,
Packit a4058c
                                   int width,
Packit a4058c
                                   int height);
Packit a4058c

Transfers image data from a Gdk drawable and converts it to an RGB(A)

Packit a4058c
representation inside a GdkPixbuf.

Packit a4058c

If the drawable src

Packit a4058c
 is a pixmap, then a suitable colormap must be specified,
Packit a4058c
since pixmaps are just blocks of pixel data without an associated colormap.
Packit a4058c
If the drawable is a window, the cmap
Packit a4058c
 argument will be ignored and the
Packit a4058c
window's own colormap will be used instead.

Packit a4058c

If the specified destination pixbuf dest

Packit a4058c
 is NULL, then this function will
Packit a4058c
create an RGB pixbuf with 8 bits per channel and no alpha, with the same size
Packit a4058c
specified by the width
Packit a4058c
 and height
Packit a4058c
 arguments.  In this case, the dest_x
Packit a4058c
 and
Packit a4058c
dest_y
Packit a4058c
 arguments must be specified as 0, otherwise the function will return
Packit a4058c
NULL.  If the specified destination pixbuf is not NULL and it contains alpha
Packit a4058c
information, then the filled pixels will be set to full opacity.

Packit a4058c

If the specified drawable is a pixmap, then the requested source rectangle

Packit a4058c
must be completely contained within the pixmap, otherwise the function will
Packit a4058c
return NULL.

Packit a4058c

If the specified drawable is a window, then it must be viewable, i.e. all of

Packit a4058c
its ancestors up to the root window must be mapped.  Also, the specified
Packit a4058c
source rectangle must be completely contained within the window and within
Packit a4058c
the screen.  If regions of the window are obscured by noninferior windows, the
Packit a4058c
contents of those regions are undefined.  The contents of regions obscured by
Packit a4058c
inferior windows of a different depth than that of the source window will also
Packit a4058c
be undefined.

Packit a4058c
Packit a4058c

Parameters

Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

dest

Packit a4058c

Destination pixbuf, or NULL if a new pixbuf should be created.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

src

Packit a4058c

Source drawable.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

cmap

Packit a4058c

A colormap if src

Packit a4058c
is a pixmap.  If it is a window, this argument will
Packit a4058c
be ignored.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

visual

Packit a4058c

A visual if src

Packit a4058c
is a pixmap.  If it is a window, this argument will
Packit a4058c
be ignored.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

src_x

Packit a4058c

Source X coordinate within drawable.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

src_y

Packit a4058c

Source Y coordinate within drawable.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

dest_x

Packit a4058c

Destination X coordinate in pixbuf, or 0 if dest

Packit a4058c
is NULL.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

dest_y

Packit a4058c

Destination Y coordinate in pixbuf, or 0 if dest

Packit a4058c
is NULL.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

width

Packit a4058c

Width in pixels of region to get.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c

height

Packit a4058c

Height in pixels of region to get.

Packit a4058c
 
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Returns

Packit a4058c

The same pixbuf as dest

Packit a4058c
if it was non-NULL, or a newly-created
Packit a4058c
pixbuf with a reference count of 1 if no destination pixbuf was specified; in
Packit a4058c
the latter case, NULL will be returned if not enough memory could be
Packit a4058c
allocated for the pixbuf to be created.

Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Types and Values

Packit a4058c
Packit a4058c
Packit a4058c
Packit a4058c

Generated by GTK-Doc V1.25.1
Packit a4058c
</body>
Packit a4058c
</html>