Skip to contents

Annotations in an x3p object are legend entries for each color of a mask.

Usage

x3p_add_annotation(x3p, color, annotation)

Arguments

x3p

x3p object

color

name or hex value of color

annotation

character value describing the region

Value

x3p object with the added annotations

Examples

if (FALSE) { # \dontrun{
logo <- x3p_read(system.file("csafe-logo.x3p", package="x3ptools"))
color_logo <- png::readPNG(system.file("csafe-color.png", package="x3ptools"))
logoplus <- x3p_add_mask(logo, as.raster(color_logo))
x3p_image(logoplus, multiply=50, size = c(741, 419),zoom = 0.5)
logoplus <- x3p_add_annotation(logoplus, "#FFFFFFFF", "background")
logoplus <- x3p_add_annotation(logoplus, "#818285FF", "text")
logoplus <- x3p_add_annotation(logoplus, "#F6BD47FF", "fingerprint")
logoplus <- x3p_add_annotation(logoplus, "#D2202FFF", "fingerprint")
logoplus <- x3p_add_annotation(logoplus, "#92278FFF", "fingerprint")

x3p_add_legend(logoplus)
} # }