space_matrix <- matrix(0L, nrow = 16L, ncol = 16L)
space_glyph <- as_bm_bitmap(space_matrix)
is_bm_bitmap(space_glyph)
font_file <- system.file("fonts/fixed/4x6.yaff.gz", package = "bittermelon")
font <- read_yaff(font_file)
bm <- as_bm_bitmap("RSTATS", font = font)
print(bm)
bm <- as_bm_bitmap("RSTATS", direction = "top-to-bottom", font = font)
print(bm)
if (require("grid") && capabilities("png")) {
circle <- as_bm_bitmap(circleGrob(r = 0.25), width = 16L, height = 16L)
print(circle)
}
if (require("grid") && capabilities("png")) {
inverted_exclamation <- as_bm_bitmap(textGrob("!", rot = 180),
width = 8L, height = 16L)
print(inverted_exclamation)
}
if (requireNamespace("mazing", quietly = TRUE)) {
m <- mazing::maze(16, 32)
bm <- as_bm_bitmap(m, walls = TRUE)
print(bm, compress = "vertical")
}
if (requireNamespace("gridpattern", quietly = TRUE)) {
w <- gridpattern::pattern_weave("twill_herringbone", nrow=14L, ncol = 40L)
bm <- as_bm_bitmap(w)
print(bm, compress = "vertical")
}
Run the code above in your browser using DataLab