grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[4/4] [PATCH] incorrect calculation of radius in circular_progress.


From: Vladimir Testov
Subject: [4/4] [PATCH] incorrect calculation of radius in circular_progress.
Date: Wed, 13 Mar 2013 14:53:10 +0400
User-agent: KMail/4.9.4 (Linux/3.5.0-23-generic; KDE/4.9.4; x86_64; ; )

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

Attachment: grub-2.00-radius-correction.patch
Description: Text Data

Attachment: grub-tick-height.png
Description: PNG image

Attachment: grub-tick-width.png
Description: PNG image

Attachment: grub-tick-rect-height.png
Description: PNG image

Attachment: grub-tick-rect-width.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]