swfDevice: Help Wanted (Windows Build) and Outlook

swfDevice is an R package I am developing that produces swf (flash) files natively from R.

If anyone can step up and help get a working windows build up and running that would be great! I have little expertise with windows and I am just about stuck as what to do next. The task involved linking to some precompiled dlls and such since ming depends on libpng, zlib, libungig and freetype. If you would like to help, send me an email (cameron.bracken [at] gmail.com).

Todo before initial CRAN release:

  • Working windows build that does not crash when any operation is performed
  • option to wrap swf output in HTML

Todo in the future (possibly before initial release but probably not):

Device features

  • xCharOffset yCharOffset
  • yLineBias
  • ipr: pixels per inch
  • cra: default character size in pixels
  • canClip: will be much harder than tikzDevice
  • canChangeGamma
  • canHAdj: not supported
  • startps: ditto
  • hasTextUTF8: should be possible with ming
  • wantSymbolUTF8: ditto

Implement remaining graphics parameters

  • gamma
  • lend
  • ljoin
  • lmitre
  • lineheight

Graphics primitives

  • metricInfo (is currently returning the same metrics for all characters, this is bad but does not severely affect the text placement)
  • textUTF8
  • strWidthUTF8

7 thoughts on “swfDevice: Help Wanted (Windows Build) and Outlook

  1. Yeah!

    Have you ever used Git? I do my regular development on Github here:


    and only occasionally push the changes to R-Forge.

    If you wanted to work on the html output feature that would be a great help. The best thing would probably be for you to fork the repo on github and then I can pull your changes. If this process is unfamiliar to you, I can fill you in over email.

  2. Sorry I have not used git yet. To wrap the swf into an HTML page, I think this will generate the critical part of HTML code: sprintf('', width, height, width, height, file, width, height, width, height, file)

  3. sorry, forgot to deal with special HTML chars.

    I mean sprintf('<object style="width: %spx; height: %spx;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="%s" height="%s" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="%s" /><embed style="width: %spx; height: %spx;" type="application/x-shockwave-flash" width="%s" height="%s" src="%s"></embed></object>', width, height, width, height, file, width, height, width, height, file)

  4. yeah, yihui began to do this, I was hoping for a patch or if you want to fork and create it on github that would be even better.

Leave a Reply

Your email address will not be published. Required fields are marked *