public void paintToRect(Graphics2D g2d, int x, int y, int w, int h) { g2d = createGraphics(g2d,x,y,w,h); // Save transcaler for this panel. Transcaler tsPanel = _ts; // Set transcaler for the graphics rectangle. _ts = getTranscaler(w,h); // Paint tiled views. for (TiledView tv : _tvs) { Graphics2D gtv = (Graphics2D)g2d.create(); tv.paint(gtv); gtv.dispose(); } // Restore transcaler for this panel. _ts = tsPanel; g2d.dispose(); }