/**
* draw debugging information about the group like its border and eye shapes.
*/
public void drawGroupDecoration(GroupAnalyzer groupAnalyzer) {
IGoGroup group = groupAnalyzer.getGroup();
GroupRegion cachedRegion = hmRegionCache_.get(group);
if ( !groupAnalyzer.isValid() || cachedRegion == null || cellSize_ != cachedRegion.cellSize ) {
// the colormap will show red if close to dead,
// so reverse the health value for the other player
double h = (groupAnalyzer.getRelativeHealth(board_, true));
if (!group.isOwnedByPlayer1()) {
h = -h;
}
cachedRegion = new GroupRegion();
cachedRegion.borderArea = calcGroupBorder( group.getStones() );
cachedRegion.borderColor = colormap_.getColorForValue( h );
cachedRegion.cellSize = cellSize_;
// cache these new values (until something changes again)
hmRegionCache_.put(group, cachedRegion);