Fixed a bug in the fill_gradient_rounded() function. It didn't always

draw the entire rectangle.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%402594
This commit is contained in:
Davis King 2008-10-24 21:27:47 +00:00
parent 7a51133652
commit c9553a5007
1 changed files with 5 additions and 6 deletions

View File

@ -530,11 +530,10 @@ namespace dlib
unsigned long m_prev = 0, m = radius, c_div = valid_area.height() - 1;
long c_top = valid_area.top();
const long c_top = valid_area.top();
const long c_bottom = valid_area.bottom();
long c_bottom = valid_area.bottom();
for ( int y = c_top; y <= c_bottom;y++ )
for ( long y = c_top; y <= c_bottom;y++ )
{
if ( y < valid_area.top() )
continue;
@ -583,8 +582,8 @@ namespace dlib
m_prev = m;
draw_line ( c, point(valid_area.left() + m, y),
point(valid_area.right() - m, y), color );
draw_line ( c, point(rect.left() + m, y),
point(rect.right() - m, y), color, valid_area );
}
}