private GeneralPath getDiagonalNbrBorder( GoBoardPosition s1, GoBoardPosition s2) {
GeneralPath border = new GeneralPath();
float celld2 = cellSize_ / 2.0f;
// upper left = ul, lr = lower right, ...
GoBoardPosition ulStone = null, lrStone = null, llStone = null, urStone = null;
if ( s1.getRow() < s2.getRow() ) {
if ( s1.getCol() < s2.getCol() ) {
ulStone = s1;
lrStone = s2;
}
else {
llStone = s2;
urStone = s1;
}
}
else {
if ( s1.getCol() < s2.getCol() ) {
llStone = s1;
urStone = s2;
}
else {
lrStone = s1;
ulStone = s2;
}
}
if ( urStone == null ) {
float ulx = margin_ + ((float) ulStone.getCol() - BORDER_OFFSET) * cellSize_;
float uly = margin_ + ((float) ulStone.getRow() - BORDER_OFFSET) * cellSize_;
float lrx = margin_ + ((float) lrStone.getCol() - BORDER_OFFSET) * cellSize_;
float lry = margin_ + ((float) lrStone.getRow() - BORDER_OFFSET) * cellSize_;
border.moveTo( ulx, uly + celld2 );
border.quadTo( ulx - celld2, uly + celld2, ulx - celld2, uly );
border.quadTo( ulx - celld2, uly - celld2, ulx, uly - celld2 );