Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

fill_shape

Draw a Filled-In Shape


Description

Calculate the path of a shape given supplied vertices and draw to screen.

Usage

fill_shape(mat, cycle = TRUE, n = 30, text = "x", ...)

Arguments

mat

an Nx2 matrix of (row, col) coordinates

cycle

logical value determining whether to the first and last coordinates

n

number of points along each edge to calculate

text

character value drawn at coordinate

...

parameters that are passed to style(), including the foreground color fg, background color bg, and attribute attr

Value

NULL

See Also

Examples

# Right Triangle
fill_shape(rbind(
  c(10,1),
  c(10,10),
  c(1,1)
), cycle=TRUE)

cursr

Cursor and Terminal Manipulation

v0.1.0
MIT + file LICENSE
Authors
Chris Mann
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.