The R Project SVN R

Rev

Rev 59039 | Rev 64662 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 19... Line 19...
19
  These functions take a unit object and convert it to an
19
  These functions take a unit object and convert it to an
20
  equivalent
20
  equivalent
21
  unit object in a different coordinate system.
21
  unit object in a different coordinate system.
22
}
22
}
23
\usage{
23
\usage{
24
convertX(x, unitTo, valueOnly = FALSE) 
24
convertX(x, unitTo, valueOnly = FALSE)
25
convertY(x, unitTo, valueOnly = FALSE) 
25
convertY(x, unitTo, valueOnly = FALSE)
26
convertWidth(x, unitTo, valueOnly = FALSE) 
26
convertWidth(x, unitTo, valueOnly = FALSE)
27
convertHeight(x, unitTo, valueOnly = FALSE) 
27
convertHeight(x, unitTo, valueOnly = FALSE)
28
convertUnit(x, unitTo,
28
convertUnit(x, unitTo,
29
             axisFrom = "x", typeFrom = "location",
29
             axisFrom = "x", typeFrom = "location",
30
             axisTo = axisFrom, typeTo = typeFrom,
30
             axisTo = axisFrom, typeTo = typeFrom,
31
             valueOnly = FALSE)
31
             valueOnly = FALSE)
32
grid.convertX(x, unitTo, valueOnly = FALSE) 
32
grid.convertX(x, unitTo, valueOnly = FALSE)
33
grid.convertY(x, unitTo, valueOnly = FALSE) 
33
grid.convertY(x, unitTo, valueOnly = FALSE)
34
grid.convertWidth(x, unitTo, valueOnly = FALSE) 
34
grid.convertWidth(x, unitTo, valueOnly = FALSE)
35
grid.convertHeight(x, unitTo, valueOnly = FALSE) 
35
grid.convertHeight(x, unitTo, valueOnly = FALSE)
36
grid.convert(x, unitTo,
36
grid.convert(x, unitTo,
37
             axisFrom = "x", typeFrom = "location",
37
             axisFrom = "x", typeFrom = "location",
38
             axisTo = axisFrom, typeTo = typeFrom,
38
             axisTo = axisFrom, typeTo = typeFrom,
39
             valueOnly = FALSE)
39
             valueOnly = FALSE)
40
}
40
}
Line 58... Line 58...
58
}
58
}
59
\details{
59
\details{
60
  The \code{convertUnit} function allows for general-purpose
60
  The \code{convertUnit} function allows for general-purpose
61
  conversions.  The other four functions are just more convenient
61
  conversions.  The other four functions are just more convenient
62
  front-ends to it for the most common conversions.
62
  front-ends to it for the most common conversions.
63
  
63
 
64
  The conversions occur within the current viewport.
64
  The conversions occur within the current viewport.
65
  
65
 
66
  It is not currently possible to convert to all valid coordinate systems
66
  It is not currently possible to convert to all valid coordinate systems
67
  (e.g., "strwidth" or "grobwidth").  I'm not sure if all of these
67
  (e.g., "strwidth" or "grobwidth").  I'm not sure if all of these
68
  are impossible, they just seem implausible at this stage.
68
  are impossible, they just seem implausible at this stage.
69
 
69
 
70
  In normal usage of grid, these functions should not be necessary.
70
  In normal usage of grid, these functions should not be necessary.
71
  If you want to express a location or dimension in inches rather
71
  If you want to express a location or dimension in inches rather
72
  than user coordinates then you should simply do something like
72
  than user coordinates then you should simply do something like
73
  \code{unit(1, "inches")} rather than something like
73
  \code{unit(1, "inches")} rather than something like
74
  \code{unit(0.134, "native")}.
74
  \code{unit(0.134, "native")}.
75
  
75
 
76
  In some cases, however, it is necessary for the user to
76
  In some cases, however, it is necessary for the user to
77
  perform calculations on a unit value and this function becomes
77
  perform calculations on a unit value and this function becomes
78
  necessary.  In such cases, please take note of the warning below.
78
  necessary.  In such cases, please take note of the warning below.
79
 
79
 
80
  The grid.* versions are just previous incarnations which have
80
  The grid.* versions are just previous incarnations which have