/** * Plots the line caps on the graph * * @param xCoordinates The x-coordinates of the caps * @param yCoordinates The y-coordinates of the caps */ private void plotLineCaps( List<Float> xCoordinates, List<Float> yCoordinates, double lineThickness) { canvas.setStrokeStyle(canvas.getBackgroundColor()); canvas.setFillStyle(color); canvas.beginPath(); Float x, y; for (int i = 1; i < xCoordinates.size(); i++) { x = xCoordinates.get(i); y = yCoordinates.get(i); canvas.moveTo(x, y); canvas.arc(x, y, lineThickness, 0, 2 * Math.PI, false); } canvas.closePath(); canvas.stroke(); canvas.fill(); }