flashDevice: A basic Flash Graphics Device for R

Description Usage Arguments Value Author(s) See Also Examples

Description

This is a simpler, more basic Flash graphics device for R than mxmlDevice, but identical in how we use it. This generates ActionScript code that creates Sprite objects and draws the shapes directly. This is different from the mxmlDevice which generates objects that have the coordinates of the elements to be displayed and draw these themselves.

See flash for details about the parameters.

Usage

1
flashDevice(file, dim = c(1000, 800), col = "black", fill = "transparent", ps = 10, wrapup = writeCode, ...)

Arguments

file

the name of the file to which the generated Flash MXML and ActionScript code should be written

dim

an integer vector of length 2 giving the width and height for the drawing canvas, in pixel units

col

the default drawing color

fill

the color for the background of the canvas

ps

the default point size for the fonts

wrapup

a function that is called when the device is closed. This performs the final operations to create the code, allowing the possibility of post-processing the code

...

additional parameters passed in the call to wrapup.

Value

Invisibly returns the new device.

Author(s)

Duncan Temple Lang

See Also

flash mxmlDevice

Examples

1
2
3
  flashDevice("foo.as")
    plot(1:10)
  dev.off()

duncantl/FlashMXML documentation built on May 15, 2019, 5:26 p.m.