g.setColor(Color.black); Dimension tileSize = getTileSize(zoom);  Rectangle clipRect = g.getClipBounds(); Point topLeft = screenToTileCoords((int) clipRect.getMinX(), (int) clipRect.getMinY()); Point bottomRight = screenToTileCoords((int) clipRect.getMaxX(), (int) clipRect.getMaxY()); int startX = (int) topLeft.getX(); int startY = (int) topLeft.getY(); int endX = (int) bottomRight.getX(); int endY = (int) bottomRight.getY()*2+1; int dy = 0; Polygon grid;  for (int y = startY; y < endY; y++, dy += tileSize.getHeight()/2) { grid = createGridPolygon(0, 0, 1); grid.translate(-(int) ((tileSize.getWidth()*.75) * (1-y%2)),dy); for (int x = startX; x < endX; x++) { g.drawPolygon(grid); grid.translate((int)(tileSize.getWidth()*1.5),0); } }
    protected void paintGrid(Graphics g, double zoom) {        // TODO    }