@Jokerking
Well which part ?
It loops over the full area , minus the area used for scrollbar
for r (float i = 0; i < widthMinusScrollbars; i += tickSize, tickCount++) {
It advances ticksize pr loop
every 5 tick count
size_t length = tickCount % 5 ? shortTickLength : longTickLength;
it shows a long tick.
then at every 10 tick ( i think) it draws the some text.
Has a bug there as
value = i * *tickSize / ratio;
seems very odd to me.
Then it draw some image.