R: Class "PictureText"

PictureText-class {grImport} | R Documentation

## Class "PictureText"

### Description

A description of a piece of text to draw, at a particular location and a particular size (and it might be part of a larger picture).

### Slots

`string`:

  Object of class `"character"`

`x`:

  Object of class `"numeric"`

`y`:

  Object of class `"numeric"`

`w`:

  Object of class `"numeric"`

`angle`:

  Object of class `"numeric"`

`rgb`:

  Object of class `"character"` that specifies the fill colour for the polygon.

`lwd`:

  Object of class `"numeric"` that specifies the line width of the polygon (only used if the character outline is stroked).

### Extends

Class `"PictureOp"`, directly.

### Methods

grobify

  `signature(object = "PictureText")`: convert to a grid grob (for one-off drawing). In addition to a `use.gc` argument, there is a `fillText` argument to specify whether to stroke or fill text paths. Filling text paths is not necessarily a good idea because some characters have holes (e.g., the letter ‘o’). The `bgText` argument can be used to specify a colour to use to fill these holes; this argument can actually be a named vector of colours so that, e.g., the hole in an ‘o’ is filled white, but the dot on an ‘i’ is filled black. Finally, there is a `sizeByWidth` argument which controls whether text is sized based on the traced width or based on the traced height of the original text.

symbolize

  `signature(object = "PictureText")`: convert to a grid grob (for drawing as a data symbol). Currently draws nothing.

drawPath

  `signature(object = "PictureText")`: draws a traced piece of text as part of the current plot.

### Author(s)

Paul Murrell

### See Also

`Picture-class`, `PictureChar-class`, and `grid.picture`, `grid.symbols`.

[Package grImport version 0.9-0 Index]