More iscissors fun. Corrected error in HACKING

More iscissors fun.
Corrected error in HACKING

-Yosh
This commit is contained in:
Manish Singh 1998-03-16 23:59:27 +00:00
parent 2e888e370c
commit 7a90885404
5 changed files with 35 additions and 49 deletions

View File

@ -1,3 +1,7 @@
Mon Mar 16 15:57:08 PST 1998 Manish Singh <yosh@gimp.org>
* app/iscissors.c: more iscissors fun
Mon Mar 16 17:05:54 CST 1998 Larry Ewing <lewing@gimp.org>
* app/commands.c: changed select_feather_cmd_callback to pass the

View File

@ -20,7 +20,7 @@ Basically this does the following for you:
cvsroot/gimp# aclocal; automake; autoconf
The above commands create the "configure" script. Now you
can run the configure script in cvsroot/gtk+ to create all
can run the configure script in cvsroot/gimp to create all
the Makefiles.
Before running autogen.sh or configure, make sure you have libtool

View File

@ -545,8 +545,8 @@ iscissors_button_press (Tool *tool,
drawable_height(drawable));
iscissors->num_segs = 0;
x = iscissors->x;
y = iscissors->y;
x = bevent->x;
y = bevent->y;
add_segment (&(iscissors->num_segs), x, y);
@ -633,7 +633,6 @@ iscissors_button_release (Tool *tool,
/* Add one additional segment */
add_segment (&(iscissors->num_segs), segs[0].x1, segs[0].y1);
if (iscissors->num_segs >= 3)
{
/* Find the boundary */
@ -672,9 +671,6 @@ iscissors_motion (Tool *tool,
gdisp = (GDisplay *) gdisp_ptr;
iscissors = (Iscissors *) tool->private;
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
&iscissors->x, &iscissors->y, FALSE, TRUE);
switch (iscissors->state)
{
@ -761,16 +757,6 @@ iscissors_draw_CR (GDisplay *gdisp,
geometry[i][1] = pts[indices[i]].dy * SUPERSAMPLE;
break;
case SCREEN_COORDS:
/* gdisplay_transform_coords_f (gdisp, , &x, &y, TRUE);
gdisplay_transform_coords (gdisp, points->x, points->y,
&points->sx, &points->sy, 0);
*/
/*
gdisplay_untransform_coords_f (gdisp, (int) pts[indices[i]].dx, (int) pts[indices[i]].dy,
&x, &y, TRUE);
*/
geometry[i][0] = x;
geometry[i][1] = y;
/*g_print("%f %f\n", x, y);*/
@ -974,6 +960,7 @@ add_segment (int *num_segs,
return 1;
}
static int
add_point (int *num_pts,
int kink,
@ -1247,6 +1234,7 @@ find_edge_xy (TempBuf *edge_buf,
static void
find_boundary (Tool *tool)
{
/* Find directional changes */
shape_of_boundary (tool);
@ -1312,8 +1300,14 @@ shape_of_boundary (Tool *tool)
for (i = 0,j=0; i < iscissors->num_kinks; i++)
{
/* untransform coords */
gdisplay_untransform_coords (gdisp, segs[i].x1, segs[i].y1,
&kinks[j].x, &kinks[j].y, FALSE, TRUE);
/*
kinks[j].x = segs[i].x1;
kinks[j].y = segs[i].y1;
*/
if(j) {
if((kinks[i].x != kinks[j-1].x) || (kinks[j].y != kinks[j-1].y))

View File

@ -545,8 +545,8 @@ iscissors_button_press (Tool *tool,
drawable_height(drawable));
iscissors->num_segs = 0;
x = iscissors->x;
y = iscissors->y;
x = bevent->x;
y = bevent->y;
add_segment (&(iscissors->num_segs), x, y);
@ -633,7 +633,6 @@ iscissors_button_release (Tool *tool,
/* Add one additional segment */
add_segment (&(iscissors->num_segs), segs[0].x1, segs[0].y1);
if (iscissors->num_segs >= 3)
{
/* Find the boundary */
@ -672,9 +671,6 @@ iscissors_motion (Tool *tool,
gdisp = (GDisplay *) gdisp_ptr;
iscissors = (Iscissors *) tool->private;
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
&iscissors->x, &iscissors->y, FALSE, TRUE);
switch (iscissors->state)
{
@ -761,16 +757,6 @@ iscissors_draw_CR (GDisplay *gdisp,
geometry[i][1] = pts[indices[i]].dy * SUPERSAMPLE;
break;
case SCREEN_COORDS:
/* gdisplay_transform_coords_f (gdisp, , &x, &y, TRUE);
gdisplay_transform_coords (gdisp, points->x, points->y,
&points->sx, &points->sy, 0);
*/
/*
gdisplay_untransform_coords_f (gdisp, (int) pts[indices[i]].dx, (int) pts[indices[i]].dy,
&x, &y, TRUE);
*/
geometry[i][0] = x;
geometry[i][1] = y;
/*g_print("%f %f\n", x, y);*/
@ -974,6 +960,7 @@ add_segment (int *num_segs,
return 1;
}
static int
add_point (int *num_pts,
int kink,
@ -1247,6 +1234,7 @@ find_edge_xy (TempBuf *edge_buf,
static void
find_boundary (Tool *tool)
{
/* Find directional changes */
shape_of_boundary (tool);
@ -1312,8 +1300,14 @@ shape_of_boundary (Tool *tool)
for (i = 0,j=0; i < iscissors->num_kinks; i++)
{
/* untransform coords */
gdisplay_untransform_coords (gdisp, segs[i].x1, segs[i].y1,
&kinks[j].x, &kinks[j].y, FALSE, TRUE);
/*
kinks[j].x = segs[i].x1;
kinks[j].y = segs[i].y1;
*/
if(j) {
if((kinks[i].x != kinks[j-1].x) || (kinks[j].y != kinks[j-1].y))

View File

@ -545,8 +545,8 @@ iscissors_button_press (Tool *tool,
drawable_height(drawable));
iscissors->num_segs = 0;
x = iscissors->x;
y = iscissors->y;
x = bevent->x;
y = bevent->y;
add_segment (&(iscissors->num_segs), x, y);
@ -633,7 +633,6 @@ iscissors_button_release (Tool *tool,
/* Add one additional segment */
add_segment (&(iscissors->num_segs), segs[0].x1, segs[0].y1);
if (iscissors->num_segs >= 3)
{
/* Find the boundary */
@ -672,9 +671,6 @@ iscissors_motion (Tool *tool,
gdisp = (GDisplay *) gdisp_ptr;
iscissors = (Iscissors *) tool->private;
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
&iscissors->x, &iscissors->y, FALSE, TRUE);
switch (iscissors->state)
{
@ -761,16 +757,6 @@ iscissors_draw_CR (GDisplay *gdisp,
geometry[i][1] = pts[indices[i]].dy * SUPERSAMPLE;
break;
case SCREEN_COORDS:
/* gdisplay_transform_coords_f (gdisp, , &x, &y, TRUE);
gdisplay_transform_coords (gdisp, points->x, points->y,
&points->sx, &points->sy, 0);
*/
/*
gdisplay_untransform_coords_f (gdisp, (int) pts[indices[i]].dx, (int) pts[indices[i]].dy,
&x, &y, TRUE);
*/
geometry[i][0] = x;
geometry[i][1] = y;
/*g_print("%f %f\n", x, y);*/
@ -974,6 +960,7 @@ add_segment (int *num_segs,
return 1;
}
static int
add_point (int *num_pts,
int kink,
@ -1247,6 +1234,7 @@ find_edge_xy (TempBuf *edge_buf,
static void
find_boundary (Tool *tool)
{
/* Find directional changes */
shape_of_boundary (tool);
@ -1312,8 +1300,14 @@ shape_of_boundary (Tool *tool)
for (i = 0,j=0; i < iscissors->num_kinks; i++)
{
/* untransform coords */
gdisplay_untransform_coords (gdisp, segs[i].x1, segs[i].y1,
&kinks[j].x, &kinks[j].y, FALSE, TRUE);
/*
kinks[j].x = segs[i].x1;
kinks[j].y = segs[i].y1;
*/
if(j) {
if((kinks[i].x != kinks[j-1].x) || (kinks[j].y != kinks[j-1].y))