MCPcopy Index your code
hub / github.com/processing/processing / triangle

Method triangle

core/src/processing/javafx/PGraphicsFX2D.java:711–730  ·  view source on GitHub ↗
(float x1, float y1, float x2, float y2,
                       float x3, float y3)

Source from the content-addressed store, hash-verified

709
710
711 @Override
712 public void triangle(float x1, float y1, float x2, float y2,
713 float x3, float y3) {
714 beforeContextDraw();
715 if (drawingThinLines()) {
716 x1 += 0.5f;
717 x2 += 0.5f;
718 x3 += 0.5f;
719 y1 += 0.5f;
720 y2 += 0.5f;
721 y3 += 0.5f;
722 }
723 context.beginPath();
724 context.moveTo(x1, y1);
725 context.lineTo(x2, y2);
726 context.lineTo(x3, y3);
727 context.closePath();
728 if (fill) context.fill();
729 if (stroke) context.stroke();
730 }
731
732
733 @Override

Callers 1

vertexMethod · 0.95

Calls 7

beforeContextDrawMethod · 0.95
drawingThinLinesMethod · 0.95
closePathMethod · 0.80
moveToMethod · 0.45
lineToMethod · 0.45
fillMethod · 0.45
strokeMethod · 0.45

Tested by

no test coverage detected