fixed boundary case.

2007-03-08  Sven Neumann  <sven@gimp.org>

	* app/base/pixel-surround.c: fixed boundary case.

svn path=/trunk/; revision=22073
This commit is contained in:
Sven Neumann 2007-03-08 14:50:19 +00:00 committed by Sven Neumann
parent 5a0b766c2b
commit a092677a4d
2 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2007-03-08 Sven Neumann <sven@gimp.org>
* app/base/pixel-surround.c: fixed boundary case.
2007-03-08 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppropwidgets.[ch]: gimp_prop_string_combo_box_new()

View file

@ -88,8 +88,16 @@ pixel_surround_get_data (PixelSurround *surround,
else
{
/* return a pointer to the buffer that's filled with the bg color */
*w = surround->w;
*h = surround->h;
if (x < 0)
*w = MIN (- x, surround->w);
else
*w = surround->w;
if (y < 0)
*h = MIN (- y, surround->h);
else
*h = surround->h;
*rowstride = surround->rowstride;
return surround->bg;