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)

