/** * Clears and repaints the triple buffer at the given rectangle or repaints * the complete buffer if no rectangle is specified. * * @param clip */ public void repaintTripleBuffer(Rectangle clip) { if (tripleBuffered && tripleBufferGraphics != null) { if (clip == null) { clip = new Rectangle(tripleBuffer.getWidth(), tripleBuffer.getHeight()); } // Clears and repaints the dirty rectangle using the // graphics canvas of the graph component as a renderer mxUtils.clearRect(tripleBufferGraphics, clip, null); tripleBufferGraphics.setClip(clip); paintGraph(tripleBufferGraphics); tripleBufferGraphics.setClip(null); repaintBuffer = false; repaintClip = null; } }
/** * Clears and repaints the triple buffer at the given rectangle or repaints * the complete buffer if no rectangle is specified. * * @param clip */ public void repaintTripleBuffer(Rectangle clip) { if (tripleBuffered && tripleBufferGraphics != null) { if (clip == null) { clip = new Rectangle(tripleBuffer.getWidth(), tripleBuffer.getHeight()); } // Clears and repaints the dirty rectangle using the // graphics canvas of the graph component as a renderer mxUtils.clearRect(tripleBufferGraphics, clip, null); tripleBufferGraphics.setClip(clip); paintGraph(tripleBufferGraphics); tripleBufferGraphics.setClip(null); repaintBuffer = false; repaintClip = null; } }