void (Graphics g, int clipx, int clipy, int clipwidth, int clipheight, Rectangle view, Rectangle viewport) { g.translate(view.x - viewport.x - 1, view.y - viewport.y - 1); g.setClip(clipx, clipy, clipwidth, clipheight); }