83 StringBuilder returnString=
new StringBuilder();
86 System.out.println(
"Case A: "+
crosses(newline,line));
87 if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) && !newline.startX.equals(line.startX)) {
88 returnString.append(
":");
90 }
else if((newline.type==StrokeType.B || newline.type==StrokeType.INV_B) &&
crosses(newline,line)){
91 returnString.append(
"-");
93 }
else if((newline.type==StrokeType.B || newline.type==StrokeType.INV_B) && !
crosses(newline,line) && newline.startX>=line.endX){
94 returnString.append(
"_");
96 }
else if((newline.type==StrokeType.C || newline.type==StrokeType.D) && !
crosses(newline,line)){
98 }
else if((newline.type==StrokeType.C || newline.type==StrokeType.D) &&
crosses(newline,line)){
100 }
else if((newline.type==StrokeType.E || newline.type==StrokeType.F) && !
crosses(newline,line)){
102 }
else if((newline.type==StrokeType.E || newline.type==StrokeType.F) &&
crosses(newline,line)){
106 return returnString.toString();
108 System.out.println(
"Case B: "+
crosses(newline,line));
109 if((newline.type==StrokeType.B || newline.type==StrokeType.INV_B) && !newline.startX.equals(line.startX) && !newline.startY.equals(line.startY)) {
112 returnString.append(
":");
114 }
else if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) &&
crosses(newline,line)){
115 returnString.append(
"-");
117 }
else if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) && !
crosses(newline,line) && newline.startX>=line.endX){
118 returnString.append(
"_");
121 return returnString.toString();
123 if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) &&
crosses(newline,line)){
124 if(newline.deltaY==0){
126 returnString.append(
"'");
129 returnString.append(
"-");
131 }
else if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) && !
crosses(newline,line)){
132 if(newline.deltaY==0){
134 returnString.append(
"-");
137 returnString.append(
"_");
139 }
else if(newline.type==StrokeType.C &&
crosses(newline,line)){
148 if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) &&
crosses(newline,line)){
149 if(newline.deltaY==0){
151 returnString.append(
"'");
154 returnString.append(
"-");
156 }
else if((newline.type==StrokeType.A || newline.type==StrokeType.INV_A) && !
crosses(newline,line)){
168 return returnString.toString();
static Boolean crosses(LineParameters one, LineParameters two)
Definition: LocationCalc.java:22
static String smallNormalOrBigStroke(StrokeType type, float delta)
Definition: LocationCalc.java:34
static Boolean startsDiagonallyToAndIntersects(LineParameters one, LineParameters two)
Definition: LocationCalc.java:30