bm_expand {bittermelon}R Documentation

Expand bitmaps by repeating each row and/or column

Description

bm_expand() expands bitmap(s) by repeating each row and/or column an indicated number of times.

Usage

bm_expand(bm_object, width = 1L, height = 1L)

Arguments

bm_object

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

width

An integer of how many times to repeat each column.

height

An integer of how many times to repeat each row.

Value

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

See Also

bm_extend() (and bm_resize() which makes larger bitmaps by adding pixels to their sides.

Examples

 font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
 font <- read_hex(font_file)
 capital_r <- font[[str2ucp("R")]]
 print(capital_r, px = px_ascii)
 print(bm_expand(capital_r, width = 2L),
       px = px_ascii)
 print(bm_expand(capital_r, height = 2L),
       px = px_ascii)
 print(bm_expand(capital_r, width = 2L, height = 2L),
       px = px_ascii)

[Package bittermelon version 1.1.1 Index]