fabric_drawing: Create a canvas element for drawing

Description Usage Arguments Value Examples

View source: R/fabric_drawing.R

Description

Create a canvas element for drawing

Usage

1
2
3
4
5
6
7
8
fabric_drawing(
  cid,
  cwidth = 800,
  cheight = 600,
  cfill = "#FFFFFF",
  drawingWidth = 2,
  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

gumSize

specify the size of the gum. Defaults to 10

Value

an HTML canvas element

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (interactive()) {

ui <- fluidPage(


   h1("Draw some stuff here"),

   fabric_drawing(cid = "canvas1")

   )

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

}

fabricerin documentation built on Aug. 15, 2020, 1:06 a.m.