[Tikzdevice-bugs] Message for maintainers of contributed graphics devices

Michael Lawrence lawrence.michael at gene.com
Fri Sep 2 17:58:37 CEST 2011


On Fri, Sep 2, 2011 at 2:14 AM, Prof Brian Ripley <ripley at stats.ox.ac.uk>wrote:

> This is about packages which contain graphics devices: I identified
>
> Cairo GDD JavaGD RSVGTipsDevice RSvgDevice cairoDevice canvas devEMF
> rscproxy tikzDevice
>
> I have noticed that some graphics devices are not setting some of the hooks
> introduced in R 2.11.0:  in current R (it is different in R-devel) there
> will be a segfault if the corresponding R-level functions are called.
>
> So please ensure that you have at least dummy entry points dd->cap and
> dd->raster set (the first should return R_NilValue).
>
> Secondly, there is the opportunity to add some new facilities in R-devel,
> to be released as R 2.14.0 on October 31.  These are the components
>
> devHoldFlush()
> haveTransparency
> haveTransparentBg
> haveCapture
> haveRaster
> haveLocator
>
> documented in src/include/GraphicsDevice.h.  (If you include them, you
> should condiitionalize on
>
> #if R_GE_version >= 9
> #endif
>
> .)  Screen devices (cairo*, JavaGD ...) will benefit from implementing
> dev.hold/dev.flush (see their help page),


Thanks for the heads up. Just wondering, what is the reason for each
graphics device implementing the logic for the hold/flush stack. Couldn't
the graphics engine just tell the device when it needs to flush and (at
least for devices that do not buffer by default) when it needs to hold?

Thanks,
Michael

and devices that implement rasterImage() should set haveRaster accordingly:
> e.g. in the near future image() will use rasters where available.
>
> The remaining components support the new dev.capabilities() function. More
> may be added in future, but if the components are unset they are initialized
> to 0, which is interpreted as NA by dev.capabilities().
>
> Brian Ripley
>
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>


More information about the Tikzdevice-bugs mailing list