bm_widths {bittermelon}R Documentation

Widths or heights of bitmaps

Description

bm_widths() returns the widths of the bitmaps while bm_heights() returns the heights of the bitmaps.

Usage

bm_widths(bm_object, unique = TRUE)

bm_heights(bm_object, unique = TRUE)

Arguments

bm_object

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

unique

Apply base::unique() to the returned integer vector.

Value

A integer vector of the relevant length of each of the bm_bitmap() objects in x. If unique is TRUE then any duplicates will have been removed.

Examples

  font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
  font <- read_hex(font_file)
  bm_widths(font) # every glyph in the font is 8 pixels wide
  bm_heights(font) # every glyph in the font is 16 pixels high

[Package bittermelon version 1.1.2 Index]