fabricerin (version 0.1.1)

fabric_drawing: Create a canvas element for drawing

Description

Create a canvas element for drawing

Usage

fabric_drawing(
  cid,
  cwidth = 800,
  cheight = 600,
  cfill = "#FFFFFF",
  drawingWidth = 2,
  drawingColor = "#1E1E1E",
  gumSize = 10
)

Arguments

cid

the id of the canvas element

cwidth

the width of the canvas element

cheight

the height of the canvas element

cfill

the color of the canvas element. Default to #FFFFFF (white)

drawingWidth

the width of the drawing output. Default to 2

drawingColor

the color of the drawing output. Default to #1E1E1E (black)

gumSize

specify the size of the gum. Defaults to 10

Value

an HTML canvas element

Examples

Run this code
# NOT RUN {
if (interactive()) {

ui <- fluidPage(

   use_fabric(),

   h1("Draw some stuff here"),

   fabric_drawing(cid = "canvas1")

   )

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

}
# }

Run the code above in your browser using DataLab