improved rounding of rounded corners. Fixes #360542, mostly.

* src/frames.c: improved rounding of rounded corners. Fixes #360542,
        mostly.
This commit is contained in:
Thomas James Alexander Thurman 2006-11-05 21:20:10 +00:00
parent af593aa5c5
commit d419955ddc
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-10-16 Elijah Newren <newren gmail com>
* src/frames.c: improved rounding of rounded corners. Fixes #360542,
mostly.
2006-10-30 Dan Mick <dan.mick@sun.com> 2006-10-30 Dan Mick <dan.mick@sun.com>
* src/window.c: (__window_is_terminal): Fix strict focus * src/window.c: (__window_is_terminal): Fix strict focus

View File

@ -793,7 +793,7 @@ meta_frames_apply_shapes (MetaFrames *frames,
for (i=0; i<radius; i++) for (i=0; i<radius; i++)
{ {
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)))); const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
xrect.x = 0; xrect.x = 0;
xrect.y = i; xrect.y = i;
xrect.width = width; xrect.width = width;
@ -810,7 +810,7 @@ meta_frames_apply_shapes (MetaFrames *frames,
for (i=0; i<radius; i++) for (i=0; i<radius; i++)
{ {
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)))); const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
xrect.x = new_window_width - width; xrect.x = new_window_width - width;
xrect.y = i; xrect.y = i;
xrect.width = width; xrect.width = width;
@ -827,7 +827,7 @@ meta_frames_apply_shapes (MetaFrames *frames,
for (i=0; i<radius; i++) for (i=0; i<radius; i++)
{ {
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)))); const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
xrect.x = 0; xrect.x = 0;
xrect.y = new_window_height - i; xrect.y = new_window_height - i;
xrect.width = width; xrect.width = width;
@ -844,7 +844,7 @@ meta_frames_apply_shapes (MetaFrames *frames,
for (i=0; i<radius; i++) for (i=0; i<radius; i++)
{ {
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)))); const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
xrect.x = new_window_width - width; xrect.x = new_window_width - width;
xrect.y = new_window_height - i; xrect.y = new_window_height - i;
xrect.width = width; xrect.width = width;