/** Clears all points and resets internal variables */ public final void reset() { pathPoints.clear(); gp.reset(); // bounds.setBounds(0,0,0,0); bounds = null; largestCoord = 0; needClosePath = false; }
/** @return this as GeneralPath */ public geogebra.common.awt.GGeneralPath getGeneralPath() { if (pathPoints.size() == 0) return gp; gp.reset(); if (largestCoord < MAX_COORD_VALUE) { addSimpleSegments(); } else { addClippedSegments(); } // clear pathPoints to free up memory pathPoints.clear(); return gp; }