1
1
\alias{gdkPixbufGetFromDrawable}
2
2
\name{gdkPixbufGetFromDrawable}
3
3
\title{gdkPixbufGetFromDrawable}
4
\description{Transfers image data from a \verb{\link{GdkDrawable}} and converts it to an RGB(A)
5
representation inside a \verb{\link{GdkPixbuf}}. In other words, copies
4
\description{Transfers image data from a \code{\link{GdkDrawable}} and converts it to an RGB(A)
5
representation inside a \code{\link{GdkPixbuf}}. In other words, copies
6
6
image data from a server-side drawable to a client-side RGB(A) buffer.
7
7
This allows you to efficiently read individual pixels on the client side.}
8
8
\usage{gdkPixbufGetFromDrawable(dest = NULL, src, cmap = NULL, src.x, src.y, dest.x, dest.y, width, height)}
10
\item{\verb{dest}}{[\verb{\link{GdkPixbuf}}] Destination pixbuf, or \code{NULL} if a new pixbuf should be created.}
11
\item{\verb{src}}{[\verb{\link{GdkDrawable}}] Source drawable.}
12
\item{\verb{cmap}}{[\verb{\link{GdkColormap}}] A colormap if \code{src} doesn't have one set.}
13
\item{\verb{src.x}}{[integer] Source X coordinate within drawable.}
14
\item{\verb{src.y}}{[integer] Source Y coordinate within drawable.}
15
\item{\verb{dest.x}}{[integer] Destination X coordinate in pixbuf, or 0 if \code{dest} is NULL.}
16
\item{\verb{dest.y}}{[integer] Destination Y coordinate in pixbuf, or 0 if \code{dest} is NULL.}
17
\item{\verb{width}}{[integer] Width in pixels of region to get.}
18
\item{\verb{height}}{[integer] Height in pixels of region to get.}
10
\item{\verb{dest}}{ Destination pixbuf, or \code{NULL} if a new pixbuf should be created. \emph{[ \acronym{allow-none} ]}}
11
\item{\verb{src}}{Source drawable.}
12
\item{\verb{cmap}}{A colormap if \code{src} doesn't have one set.}
13
\item{\verb{src.x}}{Source X coordinate within drawable.}
14
\item{\verb{src.y}}{Source Y coordinate within drawable.}
15
\item{\verb{dest.x}}{Destination X coordinate in pixbuf, or 0 if \code{dest} is NULL.}
16
\item{\verb{dest.y}}{Destination Y coordinate in pixbuf, or 0 if \code{dest} is NULL.}
17
\item{\verb{width}}{Width in pixels of region to get.}
18
\item{\verb{height}}{Height in pixels of region to get.}
20
20
\details{If the drawable \code{src} has no colormap (\code{\link{gdkDrawableGetColormap}}
21
21
returns \code{NULL}), then a suitable colormap must be specified.
22
Typically a \verb{\link{GdkWindow}} or a pixmap created by passing a \verb{\link{GdkWindow}}
22
Typically a \code{\link{GdkWindow}} or a pixmap created by passing a \code{\link{GdkWindow}}
23
23
to \code{\link{gdkPixmapNew}} will already have a colormap associated with
24
24
it. If the drawable has a colormap, the \code{cmap} argument will be
25
25
ignored. If the drawable is a bitmap (1 bit per pixel pixmap),
62
62
it returns \code{NULL}; so check the return value.)
64
64
This function calls \code{\link{gdkDrawableGetImage}} internally and
65
converts the resulting image to a \verb{\link{GdkPixbuf}}, so the
66
documentation for \code{\link{gdkDrawableGetImage}} may also be relevant. }
67
\value{[\verb{\link{GdkPixbuf}}] The same pixbuf as \code{dest} if it was non-\code{NULL}, or a newly-created
65
converts the resulting image to a \code{\link{GdkPixbuf}}, so the
66
documentation for \code{\link{gdkDrawableGetImage}} may also be relevant.}
67
\value{[\code{\link{GdkPixbuf}}] The same pixbuf as \code{dest} if it was non-\code{NULL}, or a newly-created
68
68
pixbuf with a reference count of 1 if no destination pixbuf was specified, or \code{NULL} on error}
69
69
\author{Derived by RGtkGen from GTK+ documentation}