Commits

Matteo Bertini committed e38e292

Paint "10" label in inverted colors (swap external - internal)

Comments (0)

Files changed (1)

src/it/slug/circularsliderule/CircularSlideRuleView.java

 						if (c < 20 || important(c) || (c > 50 && c % 5 == 0)) {
 							if (important(c) || (c > 50 && c % 5 == 0)) {
 								start = -(SIZE-STEP-STEP/2);
-								pen.setColor(internal_color);
 								if (important(c)) {
 									start = -(SIZE-2*STEP);
 									pen.setStrokeWidth(2);
-									pen.setTextSize(font_size);
 									ratio = 1;
+									if (c == 10) {
+										ratio *= 1.5;
+									}
+									pen.setTextSize(font_size * ratio);
 								}
 							}
+							if (c == 10) {
+								pen.setColor(external_color);
+							} else {
+								pen.setColor(internal_color);
+							}
 							canvas.drawText("" + c, 0, start - (2 + font_height) * ratio, pen);
 						} else {
-							pen.setColor(internal_color);
 							pen.setStrokeWidth(1);
 						}
+						pen.setColor(internal_color);
 					} else {
 						start = -SIZE;
 						stop = -(SIZE+STEP);
-						if (important(c)) {
-							pen.setColor(external_color);
-						}
 						if (c < 25 || important(c) || (c > 50 && c % 5 == 0)) {
 							if (important(c) || (c > 50 && c % 5 == 0)) {
 								stop = -(SIZE+STEP+STEP/2);
-								pen.setColor(external_color);
 								if (important(c)) {
 									stop = -(SIZE+2*STEP);
 									pen.setStrokeWidth(2);
-									pen.setTextSize(font_size);
 									ratio = 1;
+									if (c == 10) {
+										ratio *= 1.5;
+									}
+									pen.setTextSize(font_size * ratio);
 								}
 							}
+							if (c == 10) {
+								pen.setColor(internal_color);
+							} else {
+								pen.setColor(external_color);
+							}
 							canvas.drawText("" + c, 0, stop - 2 * ratio, pen);
 						} else {
-							pen.setColor(external_color);
 							pen.setStrokeWidth(1);
 						}
+						pen.setColor(external_color);
 					}
 					canvas.drawLine(0, start, 0, stop, pen);
 					canvas.restore();