Type Definition libR_sys::DevDesc

source ·
pub type DevDesc = _DevDesc;
Expand description

——— New (in 1.4.0) device driver structure ——— NOTES:

  1. All locations and dimensions are in device coordinates.
  2. I found this comment in the doc for dev_Open – looks nasty Any known instances of such a thing happening? Should be replaced by a function to query the device for preferred gpars settings? (to be called when the device is initialised)

NOTE that it is perfectly acceptable for this function to set generic graphics parameters too (i.e., override the generic parameter settings which GInit sets up) all at the author’s own risk of course :)

  1. Do we really need dev_StrWidth as well as dev_MetricInfo? I can see the difference between the two – its just a question of whether dev_MetricInfo should just return what dev_StrWidth would give if font metric information is not available. I guess having both allows the developer to decide when to ask for which sort of value, and to decide what to do when font metric information is not available. And why not a dev_StrHeight?
  2. Should “ipr”, “asp”, and “cra” be in the device description? If not, then where? I guess they don’t need to be if no device makes use of them. On the other hand, they would need to be replaced by a device call that R base graphics could use to get enough information to figure them out. (e.g., some sort of dpi() function to complement the size() function.)