bbx_pad: Functions for padding bbx These functions can "pad" (increase...

Description Usage Arguments Value Examples

Description

Functions for padding bbx These functions can "pad" (increase size of) bbx

Usage

1
2
3
bbx_pad_width(bbx, n = 1, word = NULL, side = "both")

bbx_pad_height(bbx, n = 1, word = NULL, side = "both")

Arguments

bbx

character vector of bounding boxes to pad

n

integer number of pixels to add. If a 'word' is provided, 'n' is interpreted as number of characters.

word

optional character vector of words contained in bbxes

side

"left", "right" (for 'bbx_pad_width()'), "up", "down" (for 'bbx_pad_height()') or "both" which side to pad

Value

a vector of validated bbxes

Examples

1
2
3
4
bbx_pad_width("5 5 10 20", word="There")
bbx_pad_width("5 5 10 20", 1)
bbx_pad_height("5 5 10 20", word="There/nbe/ndragons")
bbx_pad_height("5 5 10 20", 1)

dmi3kno/bbx documentation built on May 14, 2020, 9:08 p.m.