/** Adds point to point list and keeps track of largest coordinate. */ public final void addPoint(int pos, double x, double y) { PathPoint p = new PathPoint(x, y, true); updateBounds(p); pathPoints.ensureCapacity(pos + 1); while (pathPoints.size() <= pos) { pathPoints.add(null); } pathPoints.set(pos, p); }
/** Adds point to point list and keeps track of largest coordinate. */ private void addPoint(double x, double y, boolean lineTo) { PathPoint p = new PathPoint(x, y, lineTo); updateBounds(p); pathPoints.add(p); }