cbind.bm_bitmap()
and rbind.bm_bitmap()
combine
by columns or rows respectively.
bm_bitmap()
objects.
For cbind().bm_bitmap
either "left-to-right" (default) or its aliases "ltr" and "lr"
OR "right-to-left" or its aliases "rtl" and "rl".
For rbind().bm_bitmap
either "top-to-bottom" (default) or its aliases "ttb" and "tb"
OR "bottom-to-top" or its aliases "btt" and "bt".
The direction
argument is not case-sensitive.
Used by bm_extend()
if bitmap heights are different.
Used by bm_extend()
if bitmap widths are different.
A bm_bitmap()
object.
font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
font <- read_hex(font_file)
capital_b <- font[[str2ucp("B")]]
capital_m <- font[[str2ucp("M")]]
cbm <- cbind(capital_b, capital_m)
print(cbm, px = c(".", "#"))
#> ................
#> ................
#> ######..##...##.
#> ##...##.###.###.
#> ##...##.#######.
#> ##...##.##.#.##.
#> ######..##...##.
#> ##...##.##...##.
#> ##...##.##...##.
#> ##...##.##...##.
#> ##...##.##...##.
#> ######..##...##.
#> ................
#> ................
#> ................
#> ................
cbm_rl <- cbind(capital_b, capital_m, direction = "right-to-left")
print(cbm_rl, px = c(".", "#"))
#> ................
#> ................
#> ##...##.######..
#> ###.###.##...##.
#> #######.##...##.
#> ##.#.##.##...##.
#> ##...##.######..
#> ##...##.##...##.
#> ##...##.##...##.
#> ##...##.##...##.
#> ##...##.##...##.
#> ##...##.######..
#> ................
#> ................
#> ................
#> ................
rbm <- rbind(capital_b, capital_m)
print(rbm, px = c(".", "#"))
#> ........
#> ........
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ######..
#> ........
#> ........
#> ........
#> ........
#> ........
#> ........
#> ##...##.
#> ###.###.
#> #######.
#> ##.#.##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ........
#> ........
#> ........
#> ........
rbm_bt <- rbind(capital_b, capital_m, direction = "bottom-to-top")
print(rbm_bt, px = c(".", "#"))
#> ........
#> ........
#> ##...##.
#> ###.###.
#> #######.
#> ##.#.##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ........
#> ........
#> ........
#> ........
#> ........
#> ........
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ######..
#> ##...##.
#> ##...##.
#> ##...##.
#> ##...##.
#> ######..
#> ........
#> ........
#> ........
#> ........