clamp scale factor between 0.0 and 1.0 to avoid problems with broken

2000-12-11  Sven Neumann  <sven@gimp.org>

	* app/paint_core.c: clamp scale factor between 0.0 and 1.0 to avoid
	problems with broken XInput drivers. Should fix bug #18913.
This commit is contained in:
Sven Neumann 2000-12-11 19:30:22 +00:00 committed by Sven Neumann
parent d1fa3a5569
commit 01412f0ba2
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2000-12-11 Sven Neumann <sven@gimp.org>
* app/paint_core.c: clamp scale factor between 0.0 and 1.0 to avoid
problems with broken XInput drivers. Should fix bug #18913.
2000-12-11 Sven Neumann <sven@gimp.org>
* configure.in

View File

@ -1210,6 +1210,8 @@ paint_core_calculate_brush_size (MaskBuf *mask,
gint *width,
gint *height)
{
scale = CLAMP (scale, 0.0, 1.0);
if (current_device == GDK_CORE_POINTER)
{
*width = mask->width;
@ -1455,6 +1457,8 @@ paint_core_scale_mask (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
@ -1491,6 +1495,8 @@ paint_core_scale_pixmap (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;

View File

@ -1210,6 +1210,8 @@ paint_core_calculate_brush_size (MaskBuf *mask,
gint *width,
gint *height)
{
scale = CLAMP (scale, 0.0, 1.0);
if (current_device == GDK_CORE_POINTER)
{
*width = mask->width;
@ -1455,6 +1457,8 @@ paint_core_scale_mask (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;
@ -1491,6 +1495,8 @@ paint_core_scale_pixmap (MaskBuf *brush_mask,
gint dest_width;
gint dest_height;
scale = CLAMP (scale, 0.0, 1.0);
if (scale == 0.0)
return NULL;