Methods for geometrical transformations of
layered objects (class "layered"
).
# S3 method for layered
shift(X, vec=c(0,0), ...) # S3 method for layered
rotate(X, ..., centre=NULL)
# S3 method for layered
affine(X, ...)
# S3 method for layered
reflect(X)
# S3 method for layered
flipxy(X)
# S3 method for layered
rescale(X, s, unitname)
# S3 method for layered
scalardilate(X, ...)
Object of class "layered"
.
Arguments passed to the relevant methods
when applying the operation to each layer of X
.
Rescaling factor passed to the relevant method for
rescale
. May be missing.
Shift vector (numeric vector of length 2).
Centre of rotation.
Either a vector of length 2, or a character string
(partially matched to "centroid"
, "midpoint"
or "bottomleft"
).
The default is the coordinate origin c(0,0)
.
Optional. New name for the unit of length.
A value acceptable to the function unitname<-
Another object of class "layered"
.
These are methods for the generic functions
shift
,
rotate
,
reflect
,
affine
,
rescale
,
scalardilate
and
flipxy
for the class of layered objects.
A layered object represents data that should be plotted in
successive layers, for example, a background and a foreground.
See layered
.
# NOT RUN {
L <- layered(letterR, runifpoint(20, letterR))
plot(L)
plot(rotate(L, pi/4))
# }
Run the code above in your browser using DataLab