\HeaderA{drawtext}{Draw text on images.}{drawtext}
\aliasA{drawfont}{drawtext}{drawfont}
\begin{Description}\relax
Draws text on images.
\end{Description}
\begin{Usage}
\begin{verbatim}
  drawtext(img, xy, labels, font, col)
    
  drawfont(family=switch(.Platform$OS.type, windows="Arial", "helvetica"), 
           style="n", size=14, weight=200, antialias=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{img}] An \code{Image} object or an array.
\item[\code{xy}] Matrix (or a list of matrices if \code{img} contains multiple frames) 
of coordinates of labels.
\item[\code{labels}] A character vector (or a list of vectors if \code{img} contains multiple frames) 
containing the labels to be output.
\item[\code{font}] A font object, returned by \code{drawfont}. If missing, a default OS-dependent
font will be chosen.
\item[\code{col}] A character vector of font colors.
\item[\code{family}] A character value indicating the font family to use. Valid
examples on Linux/UNIX systems include \code{helvetica}, \code{times},
\code{courier} and \code{symbol}. Valid examples on Windows machines 
include TrueType like \code{Arial} and \code{Verdana}.
\item[\code{style}] A character value specifying the font style to use. 
Supported styles are: \code{normal} (default), \code{italic}, 
and \code{oblique}. 
\item[\code{size}] Font size in points.
\item[\code{weight}] A numeric value indicating the font weight (bold font). Supported
values range between 100 and 900.
\item[\code{antialias}] A logical value indicating whether the font should be 
anti-aliased.
\end{ldescription}
\end{Arguments}
\begin{Value}
An \code{Image} object or an array, containing the transformed version
of \code{img}.
\end{Value}
\begin{Author}\relax
Oleg Sklyar, \email{osklyar@ebi.ac.uk}, 2007
\end{Author}
\begin{Examples}
\begin{ExampleCode}
  lena = readImage(system.file("images", "lena-color.png", package="EBImage"))
  font = drawfont(weight=600, size=28)
  lena = drawtext(lena, xy=c(250, 450), labels="Lena", font=font, col="white")
  if (interactive()) display(lena)
\end{ExampleCode}
\end{Examples}

