DevDesc-class {unknown}R Documentation

Class "DevDescPtr" representing a C-level Graphics Device

Description

The DevDescPtr class represents a C-level data structure that corresponds to an existing R graphics device. If the device is active, R graphics commands will cause the device's graphical operators to be called.

We typically obtain a reference to the graphics device via the function graphicsDevice. It is also passed as an argument in each call to the R functions that operate as graphical primitives for the R-level graphics device.

We can query and set the state of the device treating it like a list in R. We can then access the individual fields, querying and setting their values using the regular R operators [[ and \$, e.g. dev$left and dev$right = 1000.

Objects from the Class

Objects of class DevDescPtr are created by the R graphics engine in C code and via the function graphicsDevice. We do not create them ourselves.

On occassion, it might be useful to convert the reference to the C structure to an R structure, i.e. one with the corresponding slots and the values as R vectors, etc. We use the DevDesc class for this and we can convert using the as function, e.g. as(dev, "DevDesc").

Slots

left:
Object of class "numeric"
right:
Object of class "numeric"
bottom:
Object of class "numeric"
top:
Object of class "numeric"
clipLeft:
Object of class "numeric"
clipRight:
Object of class "numeric"
clipBottom:
Object of class "numeric"
clipTop:
Object of class "numeric"
xCharOffset:
Object of class "numeric"
yCharOffset:
Object of class "numeric"
yLineBias:
Object of class "numeric"
ipr:
Object of class "numeric"
cra:
Object of class "numeric"
gamma:
Object of class "numeric"
canClip:
Object of class "Rboolean"
canChangeGamma:
Object of class "Rboolean"
canHAdj:
Object of class "integer"
startps:
Object of class "numeric"
startcol:
Object of class "integer"
startfill:
Object of class "integer"
startlty:
Object of class "integer"
startfont:
Object of class "integer"
startgamma:
Object of class "numeric"
deviceSpecific:
Object of class "raw"
displayListOn:
Object of class "Rboolean"
canGenMouseDown:
Object of class "Rboolean"
canGenMouseMove:
Object of class "Rboolean"
canGenMouseUp:
Object of class "Rboolean"
canGenKeybd:
Object of class "Rboolean"
gettingEvent:
Object of class "Rboolean"
hasTextUTF8:
Object of class "Rboolean"
wantSymbolUTF8:
Object of class "Rboolean"
useRotatedTextInContour:
Object of class "Rboolean"

Extends

Class "CStruct-class", directly.

Methods

"[["
signature(x = "DevDescPtr"): these methods allow one to query and set the values of the individual fiels
"$"
signature(x = "DevDescPtr"):
"[[<-"
signature(x = "DevDescPtr"):
"$<-"
signature(x = "DevDescPtr"):
"as"
signature(x = "DevDescPtr"): this method allows us to convert the C-level reference to an R-level DevDesc object using regular coercion, i.e. as(dev, "DevDesc").

Author(s)

Duncan Temple Lang

References

“The R Internals Manual”, R Development Core Team.

See Also

graphicsDevice

Examples

showClass("DevDesc")

[Package Index]