gdkPixbufGetFromDrawable        package:RGtk2        R Documentation

_g_d_k_P_i_x_b_u_f_G_e_t_F_r_o_m_D_r_a_w_a_b_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Transfers image data from a 'GdkDrawable' and converts it to an
     RGB(A) representation inside a 'GdkPixbuf'. In other words, copies
     image data from a server-side drawable to a client-side RGB(A)
     buffer. This allows you to efficiently read individual pixels on
     the client side.

_U_s_a_g_e:

     gdkPixbufGetFromDrawable(dest = NULL, src, cmap = NULL, src.x, src.y, dest.x, dest.y, width, height)

_A_r_g_u_m_e_n_t_s:

  'dest': ['GdkPixbuf']  Destination pixbuf, or 'NULL' if a new pixbuf
          should be created.

   'src': ['GdkDrawable']  Source drawable.

  'cmap': ['GdkColormap']  A colormap if 'src' doesn't have one set.

 'src.x': [integer]  Source X coordinate within drawable.

 'src.y': [integer]  Source Y coordinate within drawable.

'dest.x': [integer]  Destination X coordinate in pixbuf, or 0 if 'dest'
          is NULL.

'dest.y': [integer]  Destination Y coordinate in pixbuf, or 0 if 'dest'
          is NULL.

 'width': [integer]  Width in pixels of region to get.

'height': [integer]  Height in pixels of region to get.

_D_e_t_a_i_l_s:

     If the drawable 'src' has no colormap ('gdkDrawableGetColormap'
     returns 'NULL'), then a suitable colormap must be specified.
     Typically a 'GdkWindow' or a pixmap created by passing a
     'GdkWindow' to 'gdkPixmapNew' 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,
     'gdkColormapGetSystem' returns the correct colormap to use.

     If the specified destination pixbuf 'dest' is 'NULL', then this
     function will create an RGB pixbuf with 8 bits per channel and no
     alpha, with the same size specified by the 'width' and 'height'
     arguments.  In this case, the 'dest.x' and 'dest.y' arguments must
     be specified as 0.  If the specified destination pixbuf is not
     'NULL' 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 pixbuf corresponding to the offscreen region are undefined.

     If the window you're obtaining data from is partially obscured by
     other windows, then the contents of the pixbuf areas corresponding
     to the obscured regions are undefined.

     If the target drawable is not mapped (typically because it's
     iconified/minimized or not on the current workspace), then 'NULL'
     will be returned.

     If memory can't be allocated for the return value, 'NULL' will be
     returned instead.

     (In short, there are several ways this function can fail, and if
     it fails it returns 'NULL'; so check the return value.)

     This function calls 'gdkDrawableGetImage' internally and converts
     the resulting image to a 'GdkPixbuf', so the documentation for
     'gdkDrawableGetImage' may also be relevant.

_V_a_l_u_e:

     ['GdkPixbuf']  The same pixbuf as 'dest' if it was non-'NULL', or
     a newly-created pixbuf with a reference count of 1 if no
     destination pixbuf was specified, or 'NULL' on error

_A_u_t_h_o_r(_s):

     Derived by RGtkGen from GTK+ documentation

