oops, missed a couple of file

This commit is contained in:
Adrian Likins
1999-08-17 01:05:59 +00:00
parent e87ae53aba
commit 33a045c12f
7 changed files with 34 additions and 22 deletions

View File

@ -16,6 +16,8 @@ Mon Aug 16 20:48:33 1999 Adrian Likins <alikins@redhat.com>
useful anyway, start using it as a testbed for "image hoses". useful anyway, start using it as a testbed for "image hoses".
Right now it doesnt really work correctly. Right now it doesnt really work correctly.
* app/paintbrush.c: force pixmaps to use INCREMENTAL
1999-08-16 Tor Lillqvist <tml@iki.fi> 1999-08-16 Tor Lillqvist <tml@iki.fi>
* app/transform_core.c: Use RINT instead of rint. * app/transform_core.c: Use RINT instead of rint.

View File

@ -28,6 +28,7 @@
#include "gimpbrushgenerated.h" #include "gimpbrushgenerated.h"
#include "paint_core.h" #include "paint_core.h"
#include "gimprc.h" #include "gimprc.h"
#include "gimpbrush.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
@ -66,7 +67,7 @@ gimp_brush_generated_init(GimpBrushGenerated *brush)
guint gimp_brush_generated_get_type(void) guint gimp_brush_generated_get_type(void)
{ {
static GtkType type; static GtkType type=0;
if(!type){ if(!type){
GtkTypeInfo info={ GtkTypeInfo info={
"GimpBrushGenerated", "GimpBrushGenerated",
@ -74,8 +75,9 @@ guint gimp_brush_generated_get_type(void)
sizeof(GimpBrushGeneratedClass), sizeof(GimpBrushGeneratedClass),
(GtkClassInitFunc)gimp_brush_generated_class_init, (GtkClassInitFunc)gimp_brush_generated_class_init,
(GtkObjectInitFunc)gimp_brush_generated_init, (GtkObjectInitFunc)gimp_brush_generated_init,
NULL, /* reserved_1 */ NULL,
NULL }; /* reserved_2 */ NULL,
(GtkClassInitFunc) NULL};
type=gtk_type_unique(GIMP_TYPE_BRUSH, &info); type=gtk_type_unique(GIMP_TYPE_BRUSH, &info);
} }
return type; return type;

View File

@ -28,6 +28,7 @@
#include "gimpbrushgenerated.h" #include "gimpbrushgenerated.h"
#include "paint_core.h" #include "paint_core.h"
#include "gimprc.h" #include "gimprc.h"
#include "gimpbrush.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
@ -66,7 +67,7 @@ gimp_brush_generated_init(GimpBrushGenerated *brush)
guint gimp_brush_generated_get_type(void) guint gimp_brush_generated_get_type(void)
{ {
static GtkType type; static GtkType type=0;
if(!type){ if(!type){
GtkTypeInfo info={ GtkTypeInfo info={
"GimpBrushGenerated", "GimpBrushGenerated",
@ -74,8 +75,9 @@ guint gimp_brush_generated_get_type(void)
sizeof(GimpBrushGeneratedClass), sizeof(GimpBrushGeneratedClass),
(GtkClassInitFunc)gimp_brush_generated_class_init, (GtkClassInitFunc)gimp_brush_generated_class_init,
(GtkObjectInitFunc)gimp_brush_generated_init, (GtkObjectInitFunc)gimp_brush_generated_init,
NULL, /* reserved_1 */ NULL,
NULL }; /* reserved_2 */ NULL,
(GtkClassInitFunc) NULL};
type=gtk_type_unique(GIMP_TYPE_BRUSH, &info); type=gtk_type_unique(GIMP_TYPE_BRUSH, &info);
} }
return type; return type;

View File

@ -28,6 +28,7 @@
#include "gimpbrushgenerated.h" #include "gimpbrushgenerated.h"
#include "paint_core.h" #include "paint_core.h"
#include "gimprc.h" #include "gimprc.h"
#include "gimpbrush.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
@ -66,7 +67,7 @@ gimp_brush_generated_init(GimpBrushGenerated *brush)
guint gimp_brush_generated_get_type(void) guint gimp_brush_generated_get_type(void)
{ {
static GtkType type; static GtkType type=0;
if(!type){ if(!type){
GtkTypeInfo info={ GtkTypeInfo info={
"GimpBrushGenerated", "GimpBrushGenerated",
@ -74,8 +75,9 @@ guint gimp_brush_generated_get_type(void)
sizeof(GimpBrushGeneratedClass), sizeof(GimpBrushGeneratedClass),
(GtkClassInitFunc)gimp_brush_generated_class_init, (GtkClassInitFunc)gimp_brush_generated_class_init,
(GtkObjectInitFunc)gimp_brush_generated_init, (GtkObjectInitFunc)gimp_brush_generated_init,
NULL, /* reserved_1 */ NULL,
NULL }; /* reserved_2 */ NULL,
(GtkClassInitFunc) NULL};
type=gtk_type_unique(GIMP_TYPE_BRUSH, &info); type=gtk_type_unique(GIMP_TYPE_BRUSH, &info);
} }
return type; return type;

View File

@ -28,6 +28,7 @@
#include "gimpbrushgenerated.h" #include "gimpbrushgenerated.h"
#include "paint_core.h" #include "paint_core.h"
#include "gimprc.h" #include "gimprc.h"
#include "gimpbrush.h"
#define OVERSAMPLING 5 #define OVERSAMPLING 5
@ -66,7 +67,7 @@ gimp_brush_generated_init(GimpBrushGenerated *brush)
guint gimp_brush_generated_get_type(void) guint gimp_brush_generated_get_type(void)
{ {
static GtkType type; static GtkType type=0;
if(!type){ if(!type){
GtkTypeInfo info={ GtkTypeInfo info={
"GimpBrushGenerated", "GimpBrushGenerated",
@ -74,8 +75,9 @@ guint gimp_brush_generated_get_type(void)
sizeof(GimpBrushGeneratedClass), sizeof(GimpBrushGeneratedClass),
(GtkClassInitFunc)gimp_brush_generated_class_init, (GtkClassInitFunc)gimp_brush_generated_class_init,
(GtkObjectInitFunc)gimp_brush_generated_init, (GtkObjectInitFunc)gimp_brush_generated_init,
NULL, /* reserved_1 */ NULL,
NULL }; /* reserved_2 */ NULL,
(GtkClassInitFunc) NULL};
type=gtk_type_unique(GIMP_TYPE_BRUSH, &info); type=gtk_type_unique(GIMP_TYPE_BRUSH, &info);
} }
return type; return type;

View File

@ -23,6 +23,7 @@
#include "drawable.h" #include "drawable.h"
#include "errors.h" #include "errors.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "gimpbrushhose.h"
#include "gimpbrushlist.h" #include "gimpbrushlist.h"
#include "gradient.h" #include "gradient.h"
#include "paint_funcs.h" #include "paint_funcs.h"
@ -403,6 +404,8 @@ paintbrush_motion (PaintCore *paint_core,
/* silly hack to be removed later */ /* silly hack to be removed later */
/* paint_core->brush = gimp_brush_list_get_brush_by_index(brush_list,(rand()% gimp_brush_list_length(brush_list))); */ /* paint_core->brush = gimp_brush_list_get_brush_by_index(brush_list,(rand()% gimp_brush_list_length(brush_list))); */
/* Get a region which can be used to paint to */ /* Get a region which can be used to paint to */
if (! (area = paint_core_get_paint_area (paint_core, drawable))) if (! (area = paint_core_get_paint_area (paint_core, drawable)))
return; return;
@ -448,10 +451,12 @@ paintbrush_motion (PaintCore *paint_core,
/* color the pixels */ /* color the pixels */
/* we check to see if this is a pixmap, if so composite the
pixmap image into the are instead of the color */
if(GIMP_IS_BRUSH_PIXMAP(paint_core->brush) && !gradient_length) if(GIMP_IS_BRUSH_PIXMAP(paint_core->brush) && !gradient_length)
{ {
color_area_with_pixmap(gimage, drawable, area, paint_core->brush); color_area_with_pixmap(gimage, drawable, area, paint_core->brush);
mode = INCREMENTAL; incremental = INCREMENTAL;
} }
else else
{ {
@ -461,10 +466,6 @@ paintbrush_motion (PaintCore *paint_core,
} }
/* color_pixels (temp_buf_data (area), col, */
/* area->width * area->height, area->bytes); */
/* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, temp_blend, paint_core_paste_canvas (paint_core, drawable, temp_blend,
(int) (gimp_context_get_opacity (NULL) * 255), (int) (gimp_context_get_opacity (NULL) * 255),
gimp_context_get_paint_mode (NULL), gimp_context_get_paint_mode (NULL),

View File

@ -23,6 +23,7 @@
#include "drawable.h" #include "drawable.h"
#include "errors.h" #include "errors.h"
#include "gdisplay.h" #include "gdisplay.h"
#include "gimpbrushhose.h"
#include "gimpbrushlist.h" #include "gimpbrushlist.h"
#include "gradient.h" #include "gradient.h"
#include "paint_funcs.h" #include "paint_funcs.h"
@ -403,6 +404,8 @@ paintbrush_motion (PaintCore *paint_core,
/* silly hack to be removed later */ /* silly hack to be removed later */
/* paint_core->brush = gimp_brush_list_get_brush_by_index(brush_list,(rand()% gimp_brush_list_length(brush_list))); */ /* paint_core->brush = gimp_brush_list_get_brush_by_index(brush_list,(rand()% gimp_brush_list_length(brush_list))); */
/* Get a region which can be used to paint to */ /* Get a region which can be used to paint to */
if (! (area = paint_core_get_paint_area (paint_core, drawable))) if (! (area = paint_core_get_paint_area (paint_core, drawable)))
return; return;
@ -448,10 +451,12 @@ paintbrush_motion (PaintCore *paint_core,
/* color the pixels */ /* color the pixels */
/* we check to see if this is a pixmap, if so composite the
pixmap image into the are instead of the color */
if(GIMP_IS_BRUSH_PIXMAP(paint_core->brush) && !gradient_length) if(GIMP_IS_BRUSH_PIXMAP(paint_core->brush) && !gradient_length)
{ {
color_area_with_pixmap(gimage, drawable, area, paint_core->brush); color_area_with_pixmap(gimage, drawable, area, paint_core->brush);
mode = INCREMENTAL; incremental = INCREMENTAL;
} }
else else
{ {
@ -461,10 +466,6 @@ paintbrush_motion (PaintCore *paint_core,
} }
/* color_pixels (temp_buf_data (area), col, */
/* area->width * area->height, area->bytes); */
/* paste the newly painted canvas to the gimage which is being worked on */
paint_core_paste_canvas (paint_core, drawable, temp_blend, paint_core_paste_canvas (paint_core, drawable, temp_blend,
(int) (gimp_context_get_opacity (NULL) * 255), (int) (gimp_context_get_opacity (NULL) * 255),
gimp_context_get_paint_mode (NULL), gimp_context_get_paint_mode (NULL),