In current state, radius (R) is:
R = width / 2 - tick_width / 2 - 1
where:
width is circular_progress's width
tick_width is tick_bitmap's width
Everything goes O.K. until we have height not equal to width or tick_height not equal to tick_width. Height and tick_height have no effect on radius.
where:
height is circular_progress's height
tick_height is tick_bitmap's height
Patch fixes the strategy to count the radius.
after applying this patch we won't see 2 problems described in later part of this letter.
See files included.
example: (what was before)
center.png is 50x50 image
tick.png is 3x3 image
tick_width.png is 9x3 image
tick_height.png 3x9 image
grub-tick-height.png
width = 50
height = 50
center_image = "center.png"
tick_bitmap = "tick_height.png"
Problem1: As we can see, ticks are misplaced and some of them are incomplete.
grub-tick-width.png
width = 50
height = 50
center_image = "center.png"
tick_bitmap = "tick_width.png"
Everything is O.K.
grub-tick-rect-height.png
width = 50
height = 150
center_image = "center.png"
tick_bitmap = "tick.png"
Everything is O.K.
grub-tick-rect-width.png
width = 150
height = 50
center_image = "center.png"
tick_bitmap = "tick.png"
Problem2: We can see only two ticks - other ticks are not printed.
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru