asGtkDevice            package:gtkDevice            R Documentation

_U_s_e _G_t_k _d_r_a_w_i_n_g _a_r_e_a _w_i_d_g_e_t _a_s _n_e_w _R _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:

     This allows one to create a new R Gtk graphics device that draws
     on the specified Gtk drawing area widget. The widget can be
     created separately from the device and hence embedded within an
     arbitrary graphical interface.

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

     asGtkDevice(widget, width=300, height=300, pointsize=12)

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

  widget: an object of class 'GtkDrawingArea' typically created using
          the gtkDrawingArea function in the <URL:
          http://www.omegahat.org/RGtk> package. This should have a
          simple structure, being an external pointer object containing
          the address of the 'GtkWidget' and having a class vector
          attribute containing '"GtkDrawingArea"'. 

   width: a value giving a `hint' for the number of pixels in the
          horizontal dimension.  The device will typically determine
          this when it first draws on the widget. Note this is in
          pixels, not inches as with the 'gtk' device. 

  height: a value giving a `hint' for the number of pixels in the
          vertical dimension. The device will typically determine this
          when it first draws on the widget.

pointsize: the default pointsize to be used.

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

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

     Currently, a logical value indicating whether the creation of the
     new device was successful or not.

_N_o_t_e:

     It may be possible to compile this on Windows in the near future.

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

     Duncan Temple Lang

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

     <URL: http://www.gtk.org>, <URL: http://www.omegahat.org/RGtk>
     <URL: http://www.omegahat.org/gtk>

_S_e_e _A_l_s_o:

     'gtk' 'gtkDrawingArea'   'x11'

_E_x_a_m_p_l_e_s:

     ## Not run: 
      library(RGtk)
      win <- gtkWindow(show=FALSE)
      d <- gtkDrawingArea()
      asGtkDevice(d)
      win$Add(d)
      plot(rnorm(100))
     ## End(Not run)

