drawtext               package:EBImage               R Documentation

_D_r_a_w _t_e_x_t _o_n _i_m_a_g_e_s.

_D_e_s_c_r_i_p_t_i_o_n:

     Draws text on images.

_U_s_a_g_e:

       drawtext(img, xy, labels, font, col)
         
       drawfont(family=switch(.Platform$OS.type, windows="Arial", "helvetica"), 
                style="n", size=14, weight=200, antialias=TRUE)

_A_r_g_u_m_e_n_t_s:

     img: An 'Image' object or an array.

      xy: Matrix (or a list of matrices if 'img' contains multiple
          frames)  of coordinates of labels.

  labels: A character vector (or a list of vectors if 'img' contains
          multiple frames)  containing the labels to be output.

    font: A font object, returned by 'drawfont'. If missing, a default
          OS-dependent font will be chosen.

     col: A character vector of font colors.

  family: A character value indicating the font family to use. Valid
          examples on Linux/UNIX systems include 'helvetica', 'times',
          'courier' and 'symbol'. Valid examples on Windows machines 
          include TrueType like 'Arial' and 'Verdana'.

   style: A character value specifying the font style to use. 
          Supported styles are: 'normal' (default), 'italic',  and
          'oblique'. 

    size: Font size in points.

  weight: A numeric value indicating the font weight (bold font).
          Supported values range between 100 and 900.

antialias: A logical value indicating whether the font should be 
          anti-aliased.

_V_a_l_u_e:

     An 'Image' object or an array, containing the transformed version
     of 'img'.

_A_u_t_h_o_r(_s):

     Oleg Sklyar, osklyar@ebi.ac.uk, 2007

_E_x_a_m_p_l_e_s:

       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)

