fabric_curtail: Add a background or an overlay image to a preexisting canvas

Description Usage Arguments Value Examples

View source: R/fabric_curtail.R

Description

Add a background or an overlay image to a preexisting canvas

Usage

1
fabric_curtail(cid, imgsrc, type = "background")

Arguments

cid

the id of the canvas element

imgsrc

the URL source of the image

type

whether to use an image as a 'background' or as an 'overlay'

Value

a canvas with a background or overlay image

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
if (interactive()) {

img <- "https://st.depositphotos.com/1642482/1904/i/950/depositphotos_19049237-stock-photo-leaf.jpg"

ui <- fluidPage(



fabric_shape(cid = "canvas123",
             shapeId = "tri1",
             shape = "Triangle",
             fill = "darkblue"),

fabric_curtail(cid = "canvas123",
             imgsrc = img,
             type = "background"

             )

)

server <- function(input, output) {}


shinyApp(ui = ui, server = server)

}

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