double sinValue;
double cosValue;
double startAngle = getSkinnable().getStartAngle();
double orthText = Gauge.TickLabelOrientation.ORTHOGONAL == getSkinnable().getTickLabelOrientation() ? 0.33 : 0.31;
Point2D center = new Point2D(size * 0.5, size * 0.5);
for (double angle = 0, counter = getSkinnable().getMinValue() ; Double.compare(counter, getSkinnable().getMaxValue()) <= 0 ; angle -= angleStep, counter++) {
sinValue = Math.sin(Math.toRadians(angle + startAngle));
cosValue = Math.cos(Math.toRadians(angle + startAngle));
Point2D innerMainPoint = new Point2D(center.getX() + size * 0.368 * sinValue, center.getY() + size * 0.368 * cosValue);
Point2D innerMediumPoint = new Point2D(center.getX() + size * 0.388 * sinValue, center.getY() + size * 0.388 * cosValue);
Point2D innerMinorPoint = new Point2D(center.getX() + size * 0.3975 * sinValue, center.getY() + size * 0.3975 * cosValue);
Point2D outerPoint = new Point2D(center.getX() + size * 0.432 * sinValue, center.getY() + size * 0.432 * cosValue);
Point2D textPoint = new Point2D(center.getX() + size * orthText * sinValue, center.getY() + size * orthText * cosValue);
CTX.setStroke(getSkinnable().getTickMarkFill());
if (counter % getSkinnable().getMajorTickSpace() == 0) {
// Draw major tickmark
CTX.setLineWidth(size * 0.0055);
CTX.strokeLine(innerMainPoint.getX(), innerMainPoint.getY(), outerPoint.getX(), outerPoint.getY());
// Draw text
CTX.save();
CTX.translate(textPoint.getX(), textPoint.getY());
switch(getSkinnable().getTickLabelOrientation()) {
case ORTHOGONAL:
if ((360 - startAngle - angle) % 360 > 90 && (360 - startAngle - angle) % 360 < 270) {
CTX.rotate((180 - startAngle - angle) % 360);
} else {