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

Method lineTo

core/src/processing/opengl/LineStroker.java:447–470  ·  view source on GitHub ↗
(int x1, int y1, int c1)

Source from the content-addressed store, hash-verified

445 }
446
447 public void lineTo(int x1, int y1, int c1) {
448 // System.out.println("LineStroker.lineTo(" + x1/65536.0 + ", " + y1/65536.0 + ")");
449
450 if (lineToOrigin) {
451 if (x1 == sx0 && y1 == sy0) {
452 // staying in the starting point
453 return;
454 }
455
456 // not closing the path, do the previous lineTo
457 lineToImpl(sx0, sy0, scolor0, joinToOrigin);
458 lineToOrigin = false;
459 } else if (x1 == x0 && y1 == y0) {
460 return;
461 } else if (x1 == sx0 && y1 == sy0) {
462 lineToOrigin = true;
463 joinToOrigin = joinSegment;
464 joinSegment = false;
465 return;
466 }
467
468 lineToImpl(x1, y1, c1, joinSegment);
469 joinSegment = false;
470 }
471
472 private void lineToImpl(int x1, int y1, int c1, boolean joinSegment) {
473 computeOffset(x0, y0, x1, y1, offset);

Callers 1

emitLineToMethod · 0.45

Calls 1

lineToImplMethod · 0.95

Tested by

no test coverage detected