line: Draw a Line

Description Usage Arguments See Also Examples

Description

Draw a Line

Usage

1
line(sketch, x1 = NULL, y1 = NULL, x2 = NULL, y2 = NULL)

Arguments

sketch

A p5 sketch.

x1

The x coordinate for the first point.

y1

The y coordinate for the first point.

x2

The x coordinate for the second point.

y2

The y coordinate for the second point.

See Also

Other Shape 2D Primitives: arc, ellipse, point, quad, rect, triangle

Examples

1
2
3
4
5
6
7
## Not run: 

p5() %>%
  line(30, 20, 85, 75)


## End(Not run)

seankross/p5 documentation built on May 30, 2019, 8:17 a.m.