asGtkDevice {gtkDevice} | R Documentation |
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.
asGtkDevice(widget, width=300, height=300, pointsize=12)
widget |
an object of class GtkDrawingArea
typically created using the gtkDrawingArea function
in the 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. |
Currently, a logical value indicating whether the creation of the new device was successful or not.
It may be possible to compile this on Windows in the near future.
Duncan Temple Lang
http://www.gtk.org, http://www.omegahat.org/RGtk http://www.omegahat.org/gtk
## Not run: library(RGtk) win <- gtkWindow(show=FALSE) d <- gtkDrawingArea() asGtkDevice(d) win$Add(d) plot(rnorm(100)) ## End(Not run)