Rotates the outline of a spatial annotation to a specific degree.

rotateSpatialAnnotation(object, ...)

# S4 method for class 'SPATA2'
rotateSpatialAnnotation(
  object,
  id,
  angle,
  clockwise = TRUE,
  new_id = FALSE,
  overwrite = FALSE
)

# S4 method for class 'SpatialData'
rotateSpatialAnnotation(
  object,
  id,
  angle,
  clockwise = TRUE,
  new_id = FALSE,
  overwrite = FALSE
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

...

Additional arguments given to give_feedback().

id

Character value. The ID of the spatial annotation of interest.

angle

Numeric value. The angle by which the coordinates are rotated. Should range from 1-359.

clockwise

Logical value. If TRUE, rotation is performed in clockwise direction. If FALSE, the other way round.

new_id

Character value or FALSE. If character, the resulting spatial annotation is stored under a new ID.

overwrite

Logical value. Must be TRUE to allow overwriting.

Value

The updated input object, containing the added, removed or computed results.