if (boardRect.x < 21) { boardGraph.clearRect(0, 0, 21 - boardRect.x, boardRect.height);
if (view.x < 21) { Rectangle clear = new Rectangle(0, unLeft.y, 21, unRight.height); clear = unLeft.intersection(clear); boardGraph.clearRect(clear.x, clear.y, clear.width, clear.height); System.out.println("moveboardimage: clearing " + clear);
    private synchronized void moveBoardImage() {        // salvage the old        boardGraph.setClip(0, 0, boardRect.width, boardRect.height);        boardGraph.copyArea(0, 0, boardRect.width, boardRect.height,                            boardRect.x - view.x, boardRect.y - view.y);                // what's left to paint?        Rectangle unLeft = new Rectangle(view.x, view.y, boardRect.x - view.x, view.height);         Rectangle unRight = new Rectangle(boardRect.x + boardRect.width, view.y, view.x -boardRect.x, view.height);         Rectangle unTop = new Rectangle(view.x, view.y, view.width, boardRect.y - view.y);         Rectangle unBottom = new Rectangle(view.x, boardRect.y + boardRect.height, view.width, view.y - boardRect.y);                 // update boardRect        boardRect = new Rectangle(view);                /*		// clear the edges, if necessary		if (boardRect.x < 21) {			boardGraph.clearRect(0, 0, 21 - boardRect.x, boardRect.height);		}		if (boardRect.y < 36) {			boardGraph.clearRect(0, 0, boardRect.width, 36 - boardRect.y);		}		if (boardRect.x > (boardSize.width - boardRect.width - 21)) {			boardGraph.clearRect(boardRect.width - 21, 0, boardRect.width, boardRect.height);		}		if (boardRect.y > (boardSize.height - boardRect.height - 36)) {			boardGraph.clearRect(0,  boardRect.height - 36, boardRect.width, boardRect.height);		}        */        // paint needed areas        if (unLeft.width > 0) {            drawHexes(unLeft);        } else if (unRight.width > 0) {            drawHexes(unRight);        }        if (unTop.height > 0) {            drawHexes(unTop);        } else if (unBottom.height > 0) {            drawHexes(unBottom);        }            }