filter_image {omsvg}R Documentation

Filter: display an image

Description

Display an image using a URL or a relative path to an on-disk resource.

Usage

filter_image(image)

Arguments

image

A link or path to an image resource.

Value

An svg object.

Examples

if (interactive()) {

# Place an image (obtained via an image
# link) within a rectangle element using
# the `filter_image()` filter
SVG(width = 500, height = 500) %>%
  svg_filter(
    id = "image",
    filters = list(
      filter_image(
        image = "https://www.r-project.org/logo/Rlogo.png"
      )
    )
  ) %>%
  svg_rect(
    x = 25, y = 25,
    width = "50%", height = "50%",
    attrs = svg_attrs_pres(filter = "image")
  )
}


[Package omsvg version 0.1.0 Index]