Draw a polygon on a canvas

canvas_polygon(
  canvas,
  xs,
  ys,
  fill,
  outline,
  width,
  smooth,
  joinstyle,
  dash,
  ...
)

Arguments

canvas

a tic_ui 'canvas' element.

xs

vectors of coordinates

ys

vectors of coordinates

fill

line colour

outline

outline colour

width

line width e.g. width = 2

smooth

should the line be draw as quadratic beziers instead of line segements? logical. default: FALSE

joinstyle

Specifies the ways in which joints are to be drawn at the vertices of the line. Possible values: bevel, miter, or round). If this option is not specified then it defaults to round.

dash

Specifies the line's dash pattern. This should be a numeric vector with alternating lengths of "dash" and "space-between-dash". E.g. dash = c(6, 4, 2, 4) produces a dotted-dashed line

...

other line creation options. See https://www.tcl.tk/man/tcl8.6/TkCmd/canvas.html#M26