bm_pad() adjusts bitmap padding lengths.

bm_pad(
bm_object,
value = 0L,
type = c("exact", "extend", "trim"),
sides = NULL,
top = NULL,
right = NULL,
bottom = NULL,
left = NULL
)

## Arguments

bm_object Either a bm_bitmap(), bm_list(), or bm_font() object. Integer value for the new pixels. Either "exact", "extend", or "trim". "exact" makes sure the padding is exactly the indicated amount, "extend" does not trim any padding if existing padding is more than the indicated amount, and "trim" does not extend any padding if existing padding is less than the indicated amount. If not NULL then an integer vector indicating the desired number of pixels of padding on all four sides. If the integer vector is of length one it indicates the number of pixels for all four sides. If of length two gives first the number for the vertical sides and then the horizontal sides. If of length three gives the number of pixels for top, the horizontal sides, and then bottom sides. If of length four gives the number of pixels for top, right, bottom, and then left sides. This is the same scheme as used by the CSS padding and margin properties. Desired number of pixels of padding on the top. Desired number of pixels of padding on the right. Desired number of pixels of padding on the bottom. Desired number of pixels of padding on the left.

## Value

Either a bm_bitmap(), bm_list(), or bm_font() object.

bm_extend(), bm_resize(), and bm_trim()

## Examples

 font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
capital_r <- font[[str2ucp("R")]]
print(capital_r, px = c(".", "#"))
#> ........
#> ........
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ........
#> ........
#> ........
#> ...........
#> ...........
#> ..######...
#> ..##...##..
#> ..##...##..
#> ..##...##..
#> ..######...
#> ..##...##..
#> ..##...##..
#> ..##...##..
#> ..##...##..
#> ..##...##..
#> ...........
#> ...........`