gsvg {gWidgets} | R Documentation

## Constructor for widget to show SVG files

### Description

Some toolkit packages provide a widget to display an SVG file. This widget allows this to be embedded within a gWidgets window.

### Usage

    gsvg( filename="", width=480, height=480,
                     handler=NULL, action=NULL,
                     container = NULL, ... ,
                     toolkit=guiToolkit())

### Arguments

`filename` | SVG file
`width` | width in pixels of widget
`height` | height in pixels of widget
`handler` | Called on click event
`action` | Used to parameterize callback specified by handler
`container` | Container to attach widget to
`...` | Passed to add method of container.
`toolkit` | Which GUI toolkit to use

### Details

The `svalue` method returns the current filename.

The `svalue<-` method can be used to set a new file to display.

The `addhandlerclicked(obj, handler, action, ...)` method where handler has first argument `h` has the additional values `h\$x` and `h\$y` where these are pixel values for where the mouse click occurred.

### Note

This is implemented in Qt only (and gWidgetsWWW).

### Examples

    ## Not run:
    f = tempfile()
    svg(f)
    hist(rnorm(100))
    dev.off()
    win <- gwindow("Graphics example")
    gsvg(f, container=win)

    ## End(Not run)

[Package gWidgets version 0.0-54.2 Index]