asCairoDevice          package:cairoDevice          R Documentation

_C_o_n_v_e_r_t_i_n_g _w_i_d_g_e_t_s _a_n_d _m_o_r_e _t_o _a _C_a_i_r_o _g_r_a_p_h_i_c_s _d_e_v_i_c_e

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

     Allows one to convert an arbitrary GTK+ widget (usually a 
     'GtkDrawingArea'), a 'GdkDrawable'  (like a 'GdkPixmap'), a
     'GtkPrintContext' or a 'Cairo' context to a Cairo graphics device,
     so that R plot commands draw to the given target.

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

     asCairoDevice(widget, pointsize = 10, width = 500, height = 500)

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

  widget: The 'GtkWidget', 'GdkDrawable', 'GtkPrintContext', or 'Cairo'
          context, to which the R graphics are to be drawn

pointsize: The default font size in the R plot

   width: Width in user coordinates, only used if 'widget' is a Cairo
          context

  height: Height in user coordinates, only used if 'widget' is a Cairo
          context

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

     The main purpose of this function is to allow the user to  embed
     an R plot in a GTK user interface constructed with RGtk2. Please 
     see the examples in the RGtk2 package.

     Drawing to an offscreen 'GdkPixmap' is useful for buffering and
     transforming R graphics.  For example, one could copy the pixmap
     to a 'GdkPixbuf' and add a watermark before saving as a gif, png,
     jpg, etc.

     One may also pass a 'Cairo' context as the 'widget' parameter.
     This allows targeting arbitary Cairo surfaces. Note that the
     context state is for the most part not cleared before plotting, so
     transformations, etc, will remain in effect. Unlike Cairo, the R
     graphics system requires bounds to be specified, which may be done
     through the 'width' and 'height' parameters.

     As a convenience, 'GtkPrintContext' is also accepted as the
     'widget' parameter. This makes it easy to redirect R graphics to a
     printer selected and configured through the GTK+ printing dialogs.

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

     Michael Lawrence

_R_e_f_e_r_e_n_c_e_s:

     <URL: http://www.ggobi.org/rgtk2> <URL: http://www.gtk.org/> <URL:
     http://www.cairographics.org/>

