/** * Paints the drawing view. * Uses rendering hints for fast painting. Paints the canvasColor, the * grid, the drawing, the handles and the current tool. */ @Override public void paintComponent(Graphics gr) { Graphics2D g = (Graphics2D) gr; setViewRenderingHints(g); drawBackground(g); drawCanvas(g); drawConstrainer(g); if (isDrawingDoubleBuffered()) { if (isWindows) { drawDrawingNonvolatileBuffered(g); } else { drawDrawingVolatileBuffered(g); } } else { drawDrawing(g); } drawHandles(g); drawTool(g); }