gsvg: Constructor for widget to show SVG files

Description Usage Arguments Details Note Examples

Description

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

Usage

1
2
3
4
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

1
2
3
4
5
6
7
8
9
## Not run: 
f = tempfile()
svg(f)
hist(rnorm(100))
dev.off()
win <- gwindow("Graphics example")
gsvg(f, container=win)

## End(Not run)


Search within the gWidgets package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.