rect.svg {easySVG}R Documentation

Generate rectangle SVG element

Description

This function can generate a rect form SVG element The <rect> element is a basic SVG shape that creates rectangles, defined by their corner's position, their width, and their height. The rectangles may have their corners rounded.

Usage

rect.svg(x = NULL, y = NULL, width = NULL, height = NULL, rx = NULL,
  ry = NULL, fill, fill.opacity, stroke, stroke.width, stroke.opacity,
  stroke.dasharray, style.sheet = NULL)

Arguments

x

a number, x coordinate information

y

a number, y corrdinate information

width

a number, width of the rect

height

a number, height of the rect

rx

a number, x coordinate of rounded rectangle

ry

a number, y coordinate of rounded rectangle

fill

a character, color of the rect, eg. "#000000"(default), "red"

fill.opacity

a number, stroke opacity of the rect, default:1. If the fill opacity is 0, the rect's internal color is invisible

stroke

a characher, color of the rect line, eg. "#000000"(default), "red"

stroke.width

a number, stroke width of the rect line, default: 1

stroke.opacity

a number, stroke opacity of the rect line, default:1. If the stroke opacity is 0, the line is invisible

stroke.dasharray

a vector, plot the dotted rect line, eg. c(9, 5)

style.sheet

a vector or a chatacter, other style of the rect, eg. "stroke-linecap: round"

Value

the characher type of SVG element

Examples

rect.svg(x = 1, y = 2, width = 10, height = 20, fill = "blue")
rect.svg(x = 1, y = 2, width = 10, height = 20, stroke.dasharray = c(9, 5))
rect.svg(x = 1, y = 2, width = 10, height = 20, rx = 2, ry = 4, fill = "blue")


[Package easySVG version 0.1.0 Index]