Add a shape to an illustration defined by its path. If not path is provided, a point will be drawn.

shape_shape(rdog = NULL, id = NULL, path = NULL, color = "#333",
  stroke = 1, fill = TRUE, closed = TRUE, visible = TRUE,
  backface = TRUE, front = c(z = 1), addTo = NULL, translate = c(x
  = 0, y = 0, z = 0), rotate = c(x = 0, y = 0, z = 0), scale = c(x = 1,
  y = 1, z = 1))

Arguments

rdog

rdog object to add the shape to. Can be a character if called from a code block in shiny

id

id of the shape. If NULL, a random id will be assigned

path

Path of the shape. A named list of instructions

color

Color of the shape. A color string.

stroke

Width of the shape line. 0 will make it invisible

fill

Logical. Fill the inner shape area

closed

Logical. Should the first point and the last be connected

visible

Logical. Is the shape visible.

backface

Logical. Should backface be visible or a color string to set a different color

front

Determine where the front of the shape is to decide rendering backface color. A vector with named x, y, z elements.

addTo

Id of the parent object. If an rdog object is piped and addTo is set to NULL, the default parent will be the illustration itself.

translate

Position relative to the origin. Origin point is defined based on addTo parameter. A vector with named x, y, z elements.

rotate

Set rotation. Unit is radians. Use with pi constant. A vector with named x, y, z elements.

scale

Scale dimensons. Can be an unnamed integer or a vector with named x, y ,z elements