Commit 5dd060bd authored by jaycox's avatar jaycox
Browse files

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*
parent df68aba3
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>
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
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>
* 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>
* 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.
......
......@@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool;
}
......@@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void *
pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable,
int state)
GimpDrawable *drawable,
int state)
{
pencil_motion (paint_core, drawable);
......@@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean
pencil_non_gui (GimpDrawable *drawable,
int num_strokes,
double *stroke_array)
int num_strokes,
double *stroke_array)
{
int i;
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 */
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];
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++)
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1];
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
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.lasty = non_gui_paint_core.cury;
}
non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury;
}
/* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1);
......
......@@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool;
}
......@@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void *
pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable,
int state)
GimpDrawable *drawable,
int state)
{
pencil_motion (paint_core, drawable);
......@@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean
pencil_non_gui (GimpDrawable *drawable,
int num_strokes,
double *stroke_array)
int num_strokes,
double *stroke_array)
{
int i;
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 */
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];
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++)
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1];
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
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.lasty = non_gui_paint_core.cury;
}
non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury;
}
/* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1);
......
......@@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool;
}
......@@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void *
pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable,
int state)
GimpDrawable *drawable,
int state)
{
pencil_motion (paint_core, drawable);
......@@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean
pencil_non_gui (GimpDrawable *drawable,
int num_strokes,
double *stroke_array)
int num_strokes,
double *stroke_array)
{
int i;
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 */
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];
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++)
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1];
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
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.lasty = non_gui_paint_core.cury;
}
non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury;
}
/* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1);
......
......@@ -89,6 +89,7 @@ tools_new_pencil (void)
private = (PaintCore *) tool->private;
private->paint_func = pencil_paint_func;
private->pick_colors = TRUE;
return tool;
}
......@@ -131,8 +132,8 @@ pencil_motion (PaintCore *paint_core,
static void *
pencil_non_gui_paint_func (PaintCore *paint_core,
GimpDrawable *drawable,
int state)
GimpDrawable *drawable,
int state)
{
pencil_motion (paint_core, drawable);
......@@ -142,13 +143,13 @@ pencil_non_gui_paint_func (PaintCore *paint_core,
gboolean
pencil_non_gui (GimpDrawable *drawable,
int num_strokes,
double *stroke_array)
int num_strokes,
double *stroke_array)
{
int i;
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 */
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];
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++)
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
non_gui_paint_core.cury = stroke_array[i * 2 + 1];
{
non_gui_paint_core.curx = stroke_array[i * 2 + 0];
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.lasty = non_gui_paint_core.cury;
}
non_gui_paint_core.lastx = non_gui_paint_core.curx;
non_gui_paint_core.lasty = non_gui_paint_core.cury;
}
/* Finish the painting */
paint_core_finish (&non_gui_paint_core, drawable, -1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment