drawRotatedRectangle | R Documentation |
Image
drawRotatedRectangle
draws rotated rectangles over an
Image
object. This operation is destructive: it changes
irreversibly the Image
object and cannot be undone.
drawRotatedRectangle(
image,
x,
y,
axis1,
axis2,
angle,
color = "red",
thickness = 1
)
image |
An |
x |
A numeric value or vector representing the x coordinates of the center of each rectangle. |
y |
A numeric value or vector representing the y coordinates of the center of each rectangle. |
axis1 |
A numeric value or vector representing the length of the first axis of each rectangle. |
axis2 |
A numeric value or vector representing the length of the second axis of each rectangle. |
angle |
A numeric value or vector representing the angle in degrees
between |
color |
A value or vector of any kind of R color specification compatible
with |
thickness |
A numeric value or vector representing the thickness in pixels of each rectangle's outline (default: 1). If negative, then a filled rectangle is drawn. |
This function does not return anything. It modifies image
in
place.
Simon Garnier, garnier@njit.edu
Image
, drawRectangle
, drawEllipse
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
drawRotatedRectangle(balloon, 290, 170, 440, 325, 60, thickness = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.