View source: R/render_alpha_outline.R
| render_alpha_outline | R Documentation |
Creates a colored RGBA outline or halo from an image alpha
channel or a supplied mask. When image is supplied, the original image is
composited over the outline by default.
render_alpha_outline(
image = NULL,
mask = NULL,
expand = 0,
edge_softness = 0.1,
blur = 0,
gap_fill = 1,
gap_fill_alpha_threshold = 0.25,
color = "black",
alpha = 1,
pad = 0,
composite = TRUE,
filename = NULL,
preview = FALSE
)
image |
Default |
mask |
Default |
expand |
Default |
edge_softness |
Default |
blur |
Default |
gap_fill |
Default |
gap_fill_alpha_threshold |
Default |
color |
Default |
alpha |
Default |
pad |
Default |
composite |
Default |
filename |
Default |
preview |
Default |
A rayimg RGBA output image with a padding attribute.
txt = render_text_image("\U0001F409", size = 120, background_alpha = 0)
render_alpha_outline(txt, expand = 2, blur = 1, color = "purple") |>
plot_image()
#Make a rainbow outline
render_alpha_outline(txt, expand = 2, blur = 0.1, color = "darkgreen") |>
render_alpha_outline(expand = 2, blur = 0.1, color = "yellow") |>
render_alpha_outline(expand = 2, blur = 0.1, color = "orange") |>
render_alpha_outline(expand = 2, blur = 0.1, color = "red") |>
render_alpha_outline(expand = 2, blur = 0.1, color = "purple") |>
render_alpha_outline(expand = 2, blur = 0.1, color = "blue") |>
plot_image()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.