cbind.bm_bitmap() / cbind.bm_pixmap() and
rbind.bm_bitmap() / rbind.bm_pixmap()
combine by columns or rows respectively.
Usage
# S3 method for class 'bm_bitmap'
cbind(..., direction = "left-to-right", vjust = "center-top")
# S3 method for class 'bm_bitmap'
rbind(..., direction = "top-to-bottom", hjust = "center-left")
# S3 method for class 'bm_pixmap'
cbind(..., direction = "left-to-right", vjust = "center-top")
# S3 method for class 'bm_pixmap'
rbind(..., direction = "top-to-bottom", hjust = "center-left")Arguments
- ...
bm_bitmap()orbm_pixmap()objects.- direction
For
cbind()either "left-to-right" (default) or its aliases "ltr" and "lr" OR "right-to-left" or its aliases "rtl" and "rl". Forrbind()either "top-to-bottom" (default) or its aliases "ttb" and "tb" OR "bottom-to-top" or its aliases "btt" and "bt". Thedirectionargument is not case-sensitive.- vjust
Used by
bm_extend()if bitmap heights are different.- hjust
Used by
bm_extend()if bitmap widths are different.
Value
A bm_bitmap() or bm_pixmap() object.
Examples
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)
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ██████░░██░░░██░
#> ██░░░██░███░███░
#> ██░░░██░███████░
#> ██░░░██░██░█░██░
#> ██████░░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██████░░██░░░██░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
cbm_rl <- cbind(capital_b, capital_m, direction = "right-to-left")
print(cbm_rl)
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ██░░░██░██████░░
#> ███░███░██░░░██░
#> ███████░██░░░██░
#> ██░█░██░██░░░██░
#> ██░░░██░██████░░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██░░░██░
#> ██░░░██░██████░░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
#> ░░░░░░░░░░░░░░░░
rbm <- rbind(capital_b, capital_m)
print(rbm)
#> ░░░░░░░░
#> ░░░░░░░░
#> ██████░░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██████░░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██████░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ██░░░██░
#> ███░███░
#> ███████░
#> ██░█░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
rbm_bt <- rbind(capital_b, capital_m, direction = "bottom-to-top")
print(rbm_bt)
#> ░░░░░░░░
#> ░░░░░░░░
#> ██░░░██░
#> ███░███░
#> ███████░
#> ██░█░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ██████░░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██████░░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██░░░██░
#> ██████░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░
#> ░░░░░░░░