background = new Image(device, mapSize, mapSize);
GC gc = new GC(background);
String makeRed = "MapPerProject";
CodemapColors colors = new CodemapColors();
colors.setColor(makeRed, new MColor(255, 0, 0));
Iterable<Location> locations = mapInstance.locations();
ColorBrewer colorBrewer = new ColorBrewer();
for (Location location : locations) {
MColor color = colorBrewer.forPackage(location.getDocument());
colors.setColor(location.getDocument(), color);
}
Color black = new Color(gc.getDevice(), 0, 0, 0);
gc.setBackground(black);
gc.fillRectangle(gc.getClipping());