drawText: Draw Text on an 'Image'

Description Usage Arguments Value Author(s) See Also Examples

View source: R/draw.R

Description

drawText draws text over an Image object. This operation is destructive: it changes irreversibly the Image object and cannot be undone.

Usage

1
2
drawText(image, text, x, y, font_face = "simplex", font_scale = 1,
  italic = FALSE, color = "red", thickness = 1, bl_orig = TRUE)

Arguments

image

An Image object.

text

A character string representing the text to be drawn.

x

A numeric value representing the x coordinate of the bottom left corner of the text string (or top left if bl_orig == TRUE).

y

A numeric value representing the y coordinate of the bottom left corner of the text string (or top left if bl_orig == TRUE).

font_face

A character string representing the font type of the text (default: "simplex"). See notes for a list of available font types.

font_scale

A numeric value representing the scale factor by which the font-specific base size is multiplied (default: 1).

italic

A logical specifying whether the text should italicized (default: FALSE).

color

Any kind of R color specification compatible with col2rgb representing the color of the line (default: "red").

thickness

A numeric value representing the thickness in pixels of the line (default: 1).

bl_orig

A logical specifying the origin of the text drawing (default: TRUE). If TRUE, the text is drawn right-side-up. If FALSE, it is drawn upside-down.

Value

This function does not return anything. It modifies image in place.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, getTextSize

Examples

1
# TODO

neuroconductor-devel-releases/Rvision documentation built on Oct. 27, 2020, 1:16 p.m.