use the new color picking feature of paint_core.

* app/pencil.c: use the new color picking feature of paint_core.

* ChangeLog: added the entry that goes with my previous commit *DOH*
This commit is contained in:
jaycox 1999-05-14 00:37:58 +00:00
parent df68aba3a7
commit 5dd060bd56
5 changed files with 79 additions and 53 deletions

View File

@ -1,3 +1,7 @@
1999-05-13 Jay Cox <jaycox@earthlink.net>
* app/pencil.c: use the new color picking feature of paint_core.
Thu May 13 22:41:26 BST 1999 Andy Thomas <alt@gimp.org> Thu May 13 22:41:26 BST 1999 Andy Thomas <alt@gimp.org>
Changed:- Changed:-
@ -48,6 +52,23 @@ Thu May 13 22:41:26 BST 1999 Andy Thomas <alt@gimp.org>
the currently selected channel. MB1 + CNTRL will add the point the currently selected channel. MB1 + CNTRL will add the point
to all channels. (Thanks to Carey Bunks for the initial idea). to all channels. (Thanks to Carey Bunks for the initial idea).
1999-05-13 Jay Cox <jaycox@earthlink.net>
* app/paint_core.[ch]: set the fg or bg color if ctrl or alt is
held. use the new dropper cursor.
* app/cursorutil.[ch], app/gdisplay.[ch], app/rect_select.c: Use
GimpCursorType enum values > GDK_CURSOR_LAST instead of seperate
functions to choose between cursor types.
* app/color_picker.c: use the new dropper cursor.
* app/paintbrush.c, app/airbrush.c, app/paintbrush.c: use the new
color picking feature of paint_core.
* cursors/dropper, cursors/droppermsk: new cursor for the color
picker tool. (this cursor is REALLY ugly, someone should fix it)
1999-05-12 Scott Goehring <scott@poverty.bloomington.in.us> 1999-05-12 Scott Goehring <scott@poverty.bloomington.in.us>
* configure.in: fixed variable clobber for thread & MP options * configure.in: fixed variable clobber for thread & MP options
@ -249,7 +270,8 @@ Wed May 5 12:40:54 MEST 1999 Sven Neumann <sven@gimp.org>
1999-05-05 Jay Cox <jaycox@earthlink.net> 1999-05-05 Jay Cox <jaycox@earthlink.net>
* pixmaps/mouse1*: new bitmap files containing the new mouse cursors. * pixmaps/mouse1*: new bitmap files containing the new mouse
cursors. (based on the work of Tuomas Kuosmanen)
* app/parasitelist.c: use g_str_equal instead of parasite_compare_func. * app/parasitelist.c: use g_str_equal instead of parasite_compare_func.

View File

@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private; private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func; private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool; return tool;
} }
@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void * static void *
pencil_non_gui_paint_func (PaintCore *paint_core, pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable, GimpDrawable *drawable,
int state) int state)
{ {
pencil_motion (paint_core, drawable); pencil_motion (paint_core, drawable);
@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean gboolean
pencil_non_gui (GimpDrawable *drawable, pencil_non_gui (GimpDrawable *drawable,
int num_strokes, int num_strokes,
double *stroke_array) double *stroke_array)
{ {
int i; int i;
if (paint_core_init (&non_gui_paint_core, drawable, if (paint_core_init (&non_gui_paint_core, drawable,
stroke_array[0], stroke_array[1])) stroke_array[0], stroke_array[1]))
{ {
/* Set the paint core's paint func */ /* Set the paint core's paint func */
non_gui_paint_core.paint_func = pencil_non_gui_paint_func; non_gui_paint_core.paint_func = pencil_non_gui_paint_func;
@ -157,18 +158,18 @@ pencil_non_gui (GimpDrawable *drawable,
non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1]; non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1];
if (num_strokes == 1) if (num_strokes == 1)
pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0); pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0);
for (i = 1; i < num_strokes; i++) for (i = 1; i < num_strokes; i++)
{ {
non_gui_paint_core.curx = stroke_array[i * 2 + 0]; non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1]; non_gui_paint_core.cury = stroke_array[i * 2 + 1];
paint_core_interpolate (&non_gui_paint_core, drawable); paint_core_interpolate (&non_gui_paint_core, drawable);
non_gui_paint_core.lastx = non_gui_paint_core.curx; non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury; non_gui_paint_core.lasty = non_gui_paint_core.cury;
} }
/* Finish the painting */ /* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1); paint_core_finish (&non_gui_paint_core, drawable, -1);

View File

@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private; private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func; private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool; return tool;
} }
@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void * static void *
pencil_non_gui_paint_func (PaintCore *paint_core, pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable, GimpDrawable *drawable,
int state) int state)
{ {
pencil_motion (paint_core, drawable); pencil_motion (paint_core, drawable);
@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean gboolean
pencil_non_gui (GimpDrawable *drawable, pencil_non_gui (GimpDrawable *drawable,
int num_strokes, int num_strokes,
double *stroke_array) double *stroke_array)
{ {
int i; int i;
if (paint_core_init (&non_gui_paint_core, drawable, if (paint_core_init (&non_gui_paint_core, drawable,
stroke_array[0], stroke_array[1])) stroke_array[0], stroke_array[1]))
{ {
/* Set the paint core's paint func */ /* Set the paint core's paint func */
non_gui_paint_core.paint_func = pencil_non_gui_paint_func; non_gui_paint_core.paint_func = pencil_non_gui_paint_func;
@ -157,18 +158,18 @@ pencil_non_gui (GimpDrawable *drawable,
non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1]; non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1];
if (num_strokes == 1) if (num_strokes == 1)
pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0); pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0);
for (i = 1; i < num_strokes; i++) for (i = 1; i < num_strokes; i++)
{ {
non_gui_paint_core.curx = stroke_array[i * 2 + 0]; non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1]; non_gui_paint_core.cury = stroke_array[i * 2 + 1];
paint_core_interpolate (&non_gui_paint_core, drawable); paint_core_interpolate (&non_gui_paint_core, drawable);
non_gui_paint_core.lastx = non_gui_paint_core.curx; non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury; non_gui_paint_core.lasty = non_gui_paint_core.cury;
} }
/* Finish the painting */ /* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1); paint_core_finish (&non_gui_paint_core, drawable, -1);

View File

@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private; private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func; private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool; return tool;
} }
@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void * static void *
pencil_non_gui_paint_func (PaintCore *paint_core, pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable, GimpDrawable *drawable,
int state) int state)
{ {
pencil_motion (paint_core, drawable); pencil_motion (paint_core, drawable);
@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean gboolean
pencil_non_gui (GimpDrawable *drawable, pencil_non_gui (GimpDrawable *drawable,
int num_strokes, int num_strokes,
double *stroke_array) double *stroke_array)
{ {
int i; int i;
if (paint_core_init (&non_gui_paint_core, drawable, if (paint_core_init (&non_gui_paint_core, drawable,
stroke_array[0], stroke_array[1])) stroke_array[0], stroke_array[1]))
{ {
/* Set the paint core's paint func */ /* Set the paint core's paint func */
non_gui_paint_core.paint_func = pencil_non_gui_paint_func; non_gui_paint_core.paint_func = pencil_non_gui_paint_func;
@ -157,18 +158,18 @@ pencil_non_gui (GimpDrawable *drawable,
non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1]; non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1];
if (num_strokes == 1) if (num_strokes == 1)
pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0); pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0);
for (i = 1; i < num_strokes; i++) for (i = 1; i < num_strokes; i++)
{ {
non_gui_paint_core.curx = stroke_array[i * 2 + 0]; non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1]; non_gui_paint_core.cury = stroke_array[i * 2 + 1];
paint_core_interpolate (&non_gui_paint_core, drawable); paint_core_interpolate (&non_gui_paint_core, drawable);
non_gui_paint_core.lastx = non_gui_paint_core.curx; non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury; non_gui_paint_core.lasty = non_gui_paint_core.cury;
} }
/* Finish the painting */ /* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1); paint_core_finish (&non_gui_paint_core, drawable, -1);

View File

@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private; private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func; private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool; return tool;
} }
@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void * static void *
pencil_non_gui_paint_func (PaintCore *paint_core, pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable, GimpDrawable *drawable,
int state) int state)
{ {
pencil_motion (paint_core, drawable); pencil_motion (paint_core, drawable);
@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean gboolean
pencil_non_gui (GimpDrawable *drawable, pencil_non_gui (GimpDrawable *drawable,
int num_strokes, int num_strokes,
double *stroke_array) double *stroke_array)
{ {
int i; int i;
if (paint_core_init (&non_gui_paint_core, drawable, if (paint_core_init (&non_gui_paint_core, drawable,
stroke_array[0], stroke_array[1])) stroke_array[0], stroke_array[1]))
{ {
/* Set the paint core's paint func */ /* Set the paint core's paint func */
non_gui_paint_core.paint_func = pencil_non_gui_paint_func; non_gui_paint_core.paint_func = pencil_non_gui_paint_func;
@ -157,18 +158,18 @@ pencil_non_gui (GimpDrawable *drawable,
non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1]; non_gui_paint_core.starty = non_gui_paint_core.lasty = stroke_array[1];
if (num_strokes == 1) if (num_strokes == 1)
pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0); pencil_non_gui_paint_func (&non_gui_paint_core, drawable, 0);
for (i = 1; i < num_strokes; i++) for (i = 1; i < num_strokes; i++)
{ {
non_gui_paint_core.curx = stroke_array[i * 2 + 0]; non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1]; non_gui_paint_core.cury = stroke_array[i * 2 + 1];
paint_core_interpolate (&non_gui_paint_core, drawable); paint_core_interpolate (&non_gui_paint_core, drawable);
non_gui_paint_core.lastx = non_gui_paint_core.curx; non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury; non_gui_paint_core.lasty = non_gui_paint_core.cury;
} }
/* Finish the painting */ /* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1); paint_core_finish (&non_gui_paint_core, drawable, -1);