public void setCorner ( int index , double x , double y ) { if ( index <= 0 ) { this . x1 = x ; this . y1 = y ; } else if ( index == 1 ) { this . x2 = x ; this . y2 = y ; } else if ( index == 2 ) { this . x3 = x ; this . y3 = y ; } else if ( index >= 3 ) { this . x4 = x ; this . y4 = y ; } calcG ( ) ; }
Sets x y - coordinate of a corner .