----------------------------------------------------------------------

----------------------------------------------------------------------
 Modified Files:
 	ChangeLog app/gimpbrushgenerated.c app/gimpbrushlist.c
	 gimpbrushgenerated now supports the stingy_memory_use flag.
	 fixed a bug in select_brush() related to stingy_memory_use.
 ----------------------------------------------------------------------
This commit is contained in:
jaycox 1998-07-25 10:20:07 +00:00
parent 5007176bba
commit 1f3857c9b5
6 changed files with 52 additions and 1 deletions

View File

@ -1,3 +1,11 @@
Sat Jul 25 03:09:02 PDT 1998 Jay Cox <jaycox@earthlink.net>
* app/gimpbrushgenerated.c: swap out the mask if
stingy_memory_use is set.
* app/gimpbrushlist.c: fixed bug related to
stingy_memory_use
Fri Jul 24 14:03:13 PDT 1998 Manish Singh <yosh@gimp.org>
* app/transform*.[ch]: applied gimp-tml-980724-1 for new
@ -31,6 +39,9 @@ Fri Jul 24 01:33:13 PDT 1998 Jay Cox <jaycox@earthlink.net>
* gimpbrush.[ch]: added support for brush axis.
* gimpbrushgenerated.c: added support for brush axis.
Changed the mask intensity function from gamma to gauss(gamma)
* paint_core.[ch]: replaced the mask field with a brush field.
modified paint_core_interpolate to use brush axis.

View File

@ -21,6 +21,7 @@
#include "appenv.h"
#include "gimpbrushgenerated.h"
#include "paint_core.h"
#include "gimprc.h"
#include <math.h>
#include <stdio.h>
@ -145,6 +146,9 @@ gimp_brush_generated_load (char *file_name)
gimp_brush_generated_thaw(brush);
if (stingy_memory_use)
temp_buf_swap (GIMP_BRUSH(brush)->mask);
return brush;
}
@ -199,6 +203,7 @@ gimp_brush_generated_thaw(GimpBrushGenerated *brush)
if (brush->freeze == 0)
gimp_brush_generated_generate(brush);
}
static
double gauss(double f)
{ /* this aint' a real gauss function */
@ -232,7 +237,12 @@ gimp_brush_generated_generate(GimpBrushGenerated *brush)
if (brush->freeze) /* if we are frozen defer rerendering till later */
return;
gbrush = GIMP_BRUSH(brush);
if (stingy_memory_use && gbrush->mask)
temp_buf_unswap (gbrush->mask);
if (gbrush->mask)
{
temp_buf_free(gbrush->mask);

View File

@ -21,6 +21,7 @@
#include "appenv.h"
#include "gimpbrushgenerated.h"
#include "paint_core.h"
#include "gimprc.h"
#include <math.h>
#include <stdio.h>
@ -145,6 +146,9 @@ gimp_brush_generated_load (char *file_name)
gimp_brush_generated_thaw(brush);
if (stingy_memory_use)
temp_buf_swap (GIMP_BRUSH(brush)->mask);
return brush;
}
@ -199,6 +203,7 @@ gimp_brush_generated_thaw(GimpBrushGenerated *brush)
if (brush->freeze == 0)
gimp_brush_generated_generate(brush);
}
static
double gauss(double f)
{ /* this aint' a real gauss function */
@ -232,7 +237,12 @@ gimp_brush_generated_generate(GimpBrushGenerated *brush)
if (brush->freeze) /* if we are frozen defer rerendering till later */
return;
gbrush = GIMP_BRUSH(brush);
if (stingy_memory_use && gbrush->mask)
temp_buf_unswap (gbrush->mask);
if (gbrush->mask)
{
temp_buf_free(gbrush->mask);

View File

@ -21,6 +21,7 @@
#include "appenv.h"
#include "gimpbrushgenerated.h"
#include "paint_core.h"
#include "gimprc.h"
#include <math.h>
#include <stdio.h>
@ -145,6 +146,9 @@ gimp_brush_generated_load (char *file_name)
gimp_brush_generated_thaw(brush);
if (stingy_memory_use)
temp_buf_swap (GIMP_BRUSH(brush)->mask);
return brush;
}
@ -199,6 +203,7 @@ gimp_brush_generated_thaw(GimpBrushGenerated *brush)
if (brush->freeze == 0)
gimp_brush_generated_generate(brush);
}
static
double gauss(double f)
{ /* this aint' a real gauss function */
@ -232,7 +237,12 @@ gimp_brush_generated_generate(GimpBrushGenerated *brush)
if (brush->freeze) /* if we are frozen defer rerendering till later */
return;
gbrush = GIMP_BRUSH(brush);
if (stingy_memory_use && gbrush->mask)
temp_buf_unswap (gbrush->mask);
if (gbrush->mask)
{
temp_buf_free(gbrush->mask);

View File

@ -21,6 +21,7 @@
#include "appenv.h"
#include "gimpbrushgenerated.h"
#include "paint_core.h"
#include "gimprc.h"
#include <math.h>
#include <stdio.h>
@ -145,6 +146,9 @@ gimp_brush_generated_load (char *file_name)
gimp_brush_generated_thaw(brush);
if (stingy_memory_use)
temp_buf_swap (GIMP_BRUSH(brush)->mask);
return brush;
}
@ -199,6 +203,7 @@ gimp_brush_generated_thaw(GimpBrushGenerated *brush)
if (brush->freeze == 0)
gimp_brush_generated_generate(brush);
}
static
double gauss(double f)
{ /* this aint' a real gauss function */
@ -232,7 +237,12 @@ gimp_brush_generated_generate(GimpBrushGenerated *brush)
if (brush->freeze) /* if we are frozen defer rerendering till later */
return;
gbrush = GIMP_BRUSH(brush);
if (stingy_memory_use && gbrush->mask)
temp_buf_unswap (gbrush->mask);
if (gbrush->mask)
{
temp_buf_free(gbrush->mask);

View File

@ -376,7 +376,7 @@ void
select_brush (GimpBrush * brush)
{
/* Make sure the active brush is swapped before we get a new one... */
if (stingy_memory_use)
if (stingy_memory_use && active_brush && active_brush->mask)
temp_buf_swap (active_brush->mask);
if (active_brush)