Skip to contents

Rotate the surface matrix and mask of an x3p object. Also adjust meta information.

Usage

x3p_rotate(x3p, angle = 90)

rotate_x3p(x3p, angle = 90)

Arguments

x3p

x3p object

angle

rotate counter-clockwise by angle in degrees.

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))
dim(logoplus$surface.matrix)
dim(logoplus$mask)
x3p_image(logoplus, multiply = 50, size = c(741, 419), zoom = 0.5)

logoplus60 <- x3p_rotate(x3p = logoplus, angle = 60)
dim(logoplus60$surface.matrix)
dim(logoplus60$mask)
x3p_image(logoplus60, multiply = 50, size = c(741, 419), zoom = 0.75)
} # }