MCPcopy Index your code
hub / github.com/benfry/processing4 / line

Method line

core/src/processing/core/PGraphics.java:2546–2551  ·  view source on GitHub ↗

Draws a line (a direct path between two points) to the screen. The version of line() with four parameters draws the line in 2D. To color a line, use the stroke() function. A line cannot be filled, therefore the fill() function will not affect the color of a line. 2D lines are d

(float x1, float y1, float x2, float y2)

Source from the content-addressed store, hash-verified

2544 * @see PGraphics#beginShape()
2545 */
2546 public void line(float x1, float y1, float x2, float y2) {
2547 beginShape(LINES);
2548 vertex(x1, y1);
2549 vertex(x2, y2);
2550 endShape();
2551 }
2552
2553 /**
2554 * @param z1 z-coordinate of the first point

Callers

nothing calls this directly

Calls 3

beginShapeMethod · 0.95
vertexMethod · 0.95
endShapeMethod · 0.95

Tested by

no test coverage detected