protected boolean needToReverse(int x1,int y1,int x2,int y2){
  boolean reverse=false;
switch (getOrientation() & ~FOLLOW_POLY) {
case FORWARD:
    break;
case BACKWARD:
  reverse=true;
break;
case LEFT_TO_RIGHT:
reverse=x1 > x2;
break;
case RIGHT_TO_LEFT:
reverse=x1 < x2;
break;
case TOP_TO_BOTTOM:
reverse=y1 > y2;
break;
case BOTTOM_TO_TOP:
reverse=y1 < y2;
break;
case MOST_READABLE:
reverse=x2 < x1 || y1 > y2;
break;
}
return reverse;
}

protected boolean needToReverse ( int x1 , int y1 , int x2 , int y2 ) { boolean reverse = false ; switch ( getOrientation ( ) & ~ FOLLOW_POLY ) { case FORWARD : break ; case BACKWARD : reverse = true ; break ; case LEFT_TO_RIGHT : reverse = x1 > x2 ; break ; case RIGHT_TO_LEFT : reverse = x1 < x2 ; break ; case TOP_TO_BOTTOM : reverse = y1 > y2 ; break ; case BOTTOM_TO_TOP : reverse = y1 < y2 ; break ; case MOST_READABLE : reverse = x2 < x1 || y1 > y2 ; break ; } return reverse ; }
returns true if the polyline need to be reverted for the text to be drawn with the specified orientation .
