double tickStart = minPosition;
double tickStop = maxPosition;
if (stepSize == 0) return;
Point2D innerMainPoint;
Point2D innerMediumPoint;
Point2D innerMinorPoint;
Point2D outerPoint;
Point2D textPoint;
int tickCounter = 0;
for (double counter = tickStart ; Double.compare(counter, tickStop + 1) <= 0 ; counter += stepSize) {
if (Orientation.VERTICAL == orientation) {
innerMainPoint = new Point2D(0.36 * width, counter);
innerMediumPoint = new Point2D(0.375 * width, counter);
innerMinorPoint = new Point2D(0.39 * width, counter);
outerPoint = new Point2D(0.41 * width, counter);
textPoint = new Point2D(0.34 * width, counter);
} else {
innerMainPoint = new Point2D(counter, 0.64 * height);
innerMediumPoint = new Point2D(counter, 0.625 * height);
innerMinorPoint = new Point2D(counter, 0.61 * height);
outerPoint = new Point2D(counter, 0.59 * height);
textPoint = new Point2D(counter, 0.7 * height);
}
if (tickCounter % getSkinnable().getMajorTickSpace() == 0) {
// Draw major tickmark
CTX.setLineWidth(size * 0.007);
CTX.strokeLine(innerMainPoint.getX(), innerMainPoint.getY(), outerPoint.getX(), outerPoint.getY());
// Draw text
CTX.setTextBaseline(VPos.CENTER);
if (Orientation.VERTICAL == orientation) {
CTX.setTextAlign(TextAlignment.RIGHT);
CTX.fillText(Integer.toString((int) (getSkinnable().getMaxValue() - tickCounter * getSkinnable().getMinorTickSpace())), textPoint.getX(), textPoint.getY());
} else {
CTX.setTextAlign(TextAlignment.CENTER);
CTX.fillText(Integer.toString((int) (tickCounter * getSkinnable().getMinorTickSpace())), textPoint.getX(), textPoint.getY());
}
} else if (getSkinnable().getMinorTickSpace() % 2 != 0 && tickCounter % 5 == 0) {
CTX.setLineWidth(size * 0.006);
CTX.strokeLine(innerMediumPoint.getX(), innerMediumPoint.getY(), outerPoint.getX(), outerPoint.getY());
} else if (tickCounter % getSkinnable().getMinorTickSpace() == 0) {