Description Usage Arguments Value Examples
View source: R/fabric_curtail.R
Add a background or an overlay image to a preexisting canvas
1 | fabric_curtail(cid, imgsrc, type = "background")
|
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' |
a canvas with a background or overlay image
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.