filled_polygon: Takes an SVG polygon and partially fills it with a color....

Description Usage Arguments Author(s)

View source: R/poly_fill.R

Description

Takes an SVG polygon and partially fills it with a color. Returns a list containgin a character vector of an 'img' block that can be embedded into HTML output and the SVG text.

Usage

1
2
3
filled_polygon(fillPercentage, shapeName, viewBoxDimensions, pathSvg,
  extraSvg = "", fillColor = "red", emptyColor = "#D9D9D9",
  size = "128px")

Arguments

fillPercentage

An integer. How much to fill the polygon.

shapeName

A character vector. The internal name to assign to this polygon.

viewBoxDimensions

A character vector. The view box dimensions of the SVG (e.g., "0 0 24 24").

pathSvg

A character vector. The SVG path data (can contain multiple paths and objects that are meant to be grouped together).

extraSvg

Any extra SVG rendering commands to add to the output.

fillColor

A character vector. The color to fill it with. Can be any valid SVG color value (e.g., "#FF0000", "red")

emptyColor

A character vector. The background color of the polygon, indicating the portion of it that is "empty.'

size

A character vector. The size of the SVG output. Can be any valid HTML size argument (e.g., "64px" or "50%").

Author(s)

Blake Madden


Blake-Madden/polyfillR documentation built on March 3, 2021, 12:29 a.m.