* the corner point (alignment == 0 ) or <bold>OVER</bold> (alignment == 1), or the corner char, if the corner has no sides, it.
* @color the color attributes for of the corner
*
*/
public static void drawCorner(int startX, int startY, int endX, int endY, CharColor color, short alignment) {
Rectangle clipRect = getCurrentClipRectangle();
if ((clipRect == null)) {
drawCorner(startX, startY, endX, endY, getColorPairNumber(color),
__attributes[color.getColorAttribute()], alignment);
} else {
Point center = getCornerCenterPoint(startX,startY,endX,endY,alignment);
if ((alignment == CORNER_UNDER_LINE) || (alignment == CORNER_OVER_LINE)) {
LinePart verticalPart = null;
LinePart horizontalPart = null;
if (startX == center.x) {
int endY2 = (startY < center.y)?(center.y-1):(center.y+1);
verticalPart = new LinePart(startY,endY2,center.x,VERTICAL);
int endX2 = (endX < center.x)?(center.x-1):(center.x+1);
horizontalPart = new LinePart(endX,endX2,center.y,HORIZONTAL);
} else {
int endY3 = (endY < center.y)?(center.y-1):(center.y+1);
verticalPart = new LinePart(endY,endY3,center.x,VERTICAL);
int endX3 = (startX < center.x)?(center.x-1):(center.x+1);
horizontalPart = new LinePart(startX,endX3,center.y,HORIZONTAL);
}
drawHorizontalLine(horizontalPart._begin,horizontalPart._position,horizontalPart._end,color);
drawVerticalLine(verticalPart._position,verticalPart._begin,verticalPart._end,color);
}
if (clipRect.inside(center.x,center.y)) {
if ((alignment != CORNER_UNDER_LINE) && (alignment!=CORNER_OVER_LINE)) {
drawCorner(center.x, center.y, center.x, center.y, getColorPairNumber(color),
__attributes[color.getColorAttribute()], alignment);
} else {
short newAlignment = getCornerChar(startX,startY,endX,endY,alignment);