The R Project SVN R

Rev

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

Rev 59039 Rev 61433
Line 23... Line 23...
23
\author{ Paul Murrell }
23
\author{ Paul Murrell }
24
\section{WARNING }{ The metric information from this function is based
24
\section{WARNING }{ The metric information from this function is based
25
  on the font settings that are in effect when this function is called.
25
  on the font settings that are in effect when this function is called.
26
  It will not necessarily correspond to the metric information of any
26
  It will not necessarily correspond to the metric information of any
27
  text that is drawn on the page.
27
  text that is drawn on the page.
28
} 
28
}
29
\seealso{ \code{\link{stringAscent}}, \code{\link{stringDescent}},
29
\seealso{ \code{\link{stringAscent}}, \code{\link{stringDescent}},
30
\code{\link{grobAscent}}, and \code{\link{grobDescent}}.}
30
\code{\link{grobAscent}}, and \code{\link{grobDescent}}.}
31
 
31
 
32
\examples{
32
\examples{
33
grid.newpage()
33
grid.newpage()
Line 64... Line 64...
64
                  just="bottom",
64
                  just="bottom",
65
                  gp=gpar(col=rgb(1,0,0,.5)))
65
                  gp=gpar(col=rgb(1,0,0,.5)))
66
        grid.rect(width=unit(metric$width, "inches"),
66
        grid.rect(width=unit(metric$width, "inches"),
67
                  height=unit(metric$descent, "inches"),
67
                  height=unit(metric$descent, "inches"),
68
                  just="bottom",
68
                  just="bottom",
69
                  gp=gpar(col=rgb(1,0,0,.5)))        
69
                  gp=gpar(col=rgb(1,0,0,.5)))
70
    }
70
    }
71
}
71
}
72
 
72
 
73
tests <- list("t",
73
tests <- list("t",
74
              "test",
74
              "test",