MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / buildPath

Method buildPath

CodenameOne/src/com/codename1/maps/MapView.java:507–521  ·  view source on GitHub ↗
(List points, boolean close)

Source from the content-addressed store, hash-verified

505 }
506
507 private GeneralPath buildPath(List points, boolean close) {
508 GeneralPath path = new GeneralPath();
509 for (int i = 0; i < points.size(); i++) {
510 Point sp = engine.latLngToScreen((LatLng) points.get(i));
511 if (i == 0) {
512 path.moveTo(sp.getX(), sp.getY());
513 } else {
514 path.lineTo(sp.getX(), sp.getY());
515 }
516 }
517 if (close) {
518 path.closePath();
519 }
520 return path;
521 }
522
523 // ---- Gestures --------------------------------------------------------
524

Callers 2

drawPolylineMethod · 0.95
drawPolygonMethod · 0.95

Calls 8

moveToMethod · 0.95
getXMethod · 0.95
getYMethod · 0.95
lineToMethod · 0.95
closePathMethod · 0.95
sizeMethod · 0.65
latLngToScreenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected