gridPoly.translate(-drawLoc.x, -drawLoc.y);
    protected void paintLayer(Graphics2D g2d, TileLayer layer, double zoom) {        // Turn anti alias on for selection drawing        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,                RenderingHints.VALUE_ANTIALIAS_ON);        Rectangle clipRect = g2d.getClipBounds();        Dimension tileSize = getTileSize(zoom);        int tileStepY = tileSize.height / 2 == 0 ? 1 : tileSize.height / 2;        Point rowItr = screenToTileCoords(clipRect.x, clipRect.y);        rowItr.x--;        Point drawLoc = tileToScreenCoords(rowItr.x, rowItr.y);        drawLoc.x -= tileSize.width / 2;        drawLoc.y += tileSize.height;        // Determine area to draw from clipping rectangle        int columns = clipRect.width / tileSize.width + 3;        int rows = (clipRect.height + (int)(map.getTileHeightMax() * zoom)) /            tileStepY + 4;        // Draw this map layer        for (int y = 0; y < rows; y++) {            Point columnItr = new Point(rowItr);            for (int x = 0; x < columns; x++) {                Tile tile = layer.getTileAt(columnItr.x, columnItr.y);                if (tile != null) {                    if (layer instanceof SelectionLayer) {                        Polygon gridPoly = createGridPolygon(                                drawLoc.x, drawLoc.y - tileSize.height, 0);                        g2d.fillPolygon(gridPoly);                        //paintEdge(g2d, layer, drawLoc.x, drawLoc.y);                    } else {                        tile.draw(g2d, drawLoc.x, drawLoc.y, zoom);                    }                }                // Advance to the next tile                columnItr.x++;                columnItr.y--;                drawLoc.x += tileSize.width;            }            // Advance to the next row            if ((y & 1) > 0) {                rowItr.x++;                drawLoc.x += tileSize.width / 2;            } else {                rowItr.y++;                drawLoc.x -= tileSize.width / 2;            }            drawLoc.x -= columns * tileSize.width;            drawLoc.y += tileStepY;        }    }