Skip to contents

is_bm_list() returns TRUE for bm_list() objects (or subclasses) and FALSE for all other objects.

Usage

is_bm_list(x, class = NULL)

Arguments

x

An object

class

If NULL (the default) don't check the class of the elements. Otherwise a character vector: returns TRUE only if all elements (if any) of x inherit from at least one of the classes in class.

Value

TRUE or FALSE

See also

Examples

 font_file <- system.file("fonts/spleen/spleen-8x16.hex.gz", package = "bittermelon")
 font <- read_hex(font_file)
 is_bm_list(font)
#> [1] TRUE
 is_bm_list(font, class = "bm_bitmap")
#> [1] TRUE
 is_bm_list(font, class = "bm_pixmap")
#> [1] FALSE