mirror of https://github.com/GNOME/gimp.git
Reworked the guide drawing and picking code to remove all known guide
Mon Mar 16 05:12:00 CST 1998 Larry Ewing <lewing@gimp.org> * app/move.c: * app/gdisplay.c: * app/gimage.c: Reworked the guide drawing and picking code to remove all known guide artifacts.
This commit is contained in:
parent
798a99b03d
commit
d5cfeb6643
|
@ -1,3 +1,10 @@
|
|||
Mon Mar 16 05:12:00 CST 1998 Larry Ewing <lewing@gimp.org>
|
||||
|
||||
* app/move.c:
|
||||
* app/gdisplay.c:
|
||||
* app/gimage.c: Reworked the guide drawing and picking code to
|
||||
remove all known guide artifacts.
|
||||
|
||||
Mon Mar 16 12:20:12 EET 1998 Lauri Alanko <la@iki.fi>
|
||||
|
||||
* app/menus.c: Fixed the tool options disappearing at undo.
|
||||
|
|
|
@ -487,13 +487,15 @@ gdisplay_find_guide (GDisplay *gdisp,
|
|||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_y);
|
||||
if ((pos > (y - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (y - EPSILON)) &&
|
||||
(pos < (y + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_x);
|
||||
if ((pos > (x - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (x - EPSILON)) &&
|
||||
(pos < (x + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
|
@ -1056,31 +1058,21 @@ void
|
|||
gdisplay_expose_guide (GDisplay *gdisp,
|
||||
Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int x, y;
|
||||
int w, h;
|
||||
|
||||
if (guide->position < 0)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE);
|
||||
gdisplay_transform_coords (gdisp, guide->position, guide->position, &x, &y, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
gdisplay_transform_coords (gdisp, guide->position,
|
||||
guide->position, &x, &y, FALSE);
|
||||
|
||||
switch (guide->orientation)
|
||||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x1, y, x2 - x1, 1);
|
||||
gdisplay_expose_area (gdisp, 0, y, gdisp->disp_width, 1);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x, y1, 1, y2 - y1);
|
||||
gdisplay_expose_area (gdisp, x, 0, 1, gdisp->disp_height);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -487,13 +487,15 @@ gdisplay_find_guide (GDisplay *gdisp,
|
|||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_y);
|
||||
if ((pos > (y - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (y - EPSILON)) &&
|
||||
(pos < (y + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_x);
|
||||
if ((pos > (x - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (x - EPSILON)) &&
|
||||
(pos < (x + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
|
@ -1056,31 +1058,21 @@ void
|
|||
gdisplay_expose_guide (GDisplay *gdisp,
|
||||
Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int x, y;
|
||||
int w, h;
|
||||
|
||||
if (guide->position < 0)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE);
|
||||
gdisplay_transform_coords (gdisp, guide->position, guide->position, &x, &y, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
gdisplay_transform_coords (gdisp, guide->position,
|
||||
guide->position, &x, &y, FALSE);
|
||||
|
||||
switch (guide->orientation)
|
||||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x1, y, x2 - x1, 1);
|
||||
gdisplay_expose_area (gdisp, 0, y, gdisp->disp_width, 1);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x, y1, 1, y2 - y1);
|
||||
gdisplay_expose_area (gdisp, x, 0, 1, gdisp->disp_height);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -487,13 +487,15 @@ gdisplay_find_guide (GDisplay *gdisp,
|
|||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_y);
|
||||
if ((pos > (y - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (y - EPSILON)) &&
|
||||
(pos < (y + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
pos = (int) (scale * guide->position - offset_x);
|
||||
if ((pos > (x - EPSILON)) &&
|
||||
if ((guide->position != -1) &&
|
||||
(pos > (x - EPSILON)) &&
|
||||
(pos < (x + EPSILON)))
|
||||
return guide;
|
||||
break;
|
||||
|
@ -1056,31 +1058,21 @@ void
|
|||
gdisplay_expose_guide (GDisplay *gdisp,
|
||||
Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int x, y;
|
||||
int w, h;
|
||||
|
||||
if (guide->position < 0)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->disp_width, gdisp->disp_height, &x2, &y2, FALSE);
|
||||
gdisplay_transform_coords (gdisp, guide->position, guide->position, &x, &y, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
gdisplay_transform_coords (gdisp, guide->position,
|
||||
guide->position, &x, &y, FALSE);
|
||||
|
||||
switch (guide->orientation)
|
||||
{
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x1, y, x2 - x1, 1);
|
||||
gdisplay_expose_area (gdisp, 0, y, gdisp->disp_width, 1);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_expose_area (gdisp, x, y1, 1, y2 - y1);
|
||||
gdisplay_expose_area (gdisp, x, 0, 1, gdisp->disp_height);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
93
app/move.c
93
app/move.c
|
@ -127,6 +127,43 @@ move_tool_button_press (Tool *tool,
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
move_draw_guide (GDisplay *gdisp, Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
int x, y;
|
||||
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
|
||||
if (guide->position == -1)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width,
|
||||
gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
switch (guide->orientation) {
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, 0, guide->position, &x1, &y, FALSE);
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, guide->position, 0, &x, &y1, FALSE);
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
move_tool_button_release (Tool *tool,
|
||||
GdkEventButton *bevent,
|
||||
|
@ -175,6 +212,7 @@ move_tool_button_release (Tool *tool,
|
|||
|
||||
if (remove_guide)
|
||||
{
|
||||
move_draw_guide (gdisp, move->guide);
|
||||
move->guide->position = -1;
|
||||
move->guide = NULL;
|
||||
move->guide_disp = -1;
|
||||
|
@ -208,65 +246,34 @@ void
|
|||
move_tool_motion (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
gpointer gdisp_ptr)
|
||||
|
||||
{
|
||||
MoveTool *private;
|
||||
GDisplay *gdisp;
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
MoveTool *private;
|
||||
int x, y;
|
||||
|
||||
private = tool->private;
|
||||
gdisp = gdisp_ptr;
|
||||
private = tool->private;
|
||||
|
||||
if (private->guide)
|
||||
{
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
|
||||
&x, &y, TRUE, FALSE);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, 0, mevent->y,
|
||||
&x, &private->guide->position,
|
||||
TRUE, FALSE);
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
private->guide->position = y;
|
||||
else
|
||||
private->guide->position = x;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
}
|
||||
}
|
||||
else if (private->guide->orientation == VERTICAL_GUIDE)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, 0,
|
||||
&private->guide->position, &y,
|
||||
TRUE, FALSE);
|
||||
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
}
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
move_tool_cursor_update (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
|
|
|
@ -127,6 +127,43 @@ move_tool_button_press (Tool *tool,
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
move_draw_guide (GDisplay *gdisp, Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
int x, y;
|
||||
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
|
||||
if (guide->position == -1)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width,
|
||||
gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
switch (guide->orientation) {
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, 0, guide->position, &x1, &y, FALSE);
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, guide->position, 0, &x, &y1, FALSE);
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
move_tool_button_release (Tool *tool,
|
||||
GdkEventButton *bevent,
|
||||
|
@ -175,6 +212,7 @@ move_tool_button_release (Tool *tool,
|
|||
|
||||
if (remove_guide)
|
||||
{
|
||||
move_draw_guide (gdisp, move->guide);
|
||||
move->guide->position = -1;
|
||||
move->guide = NULL;
|
||||
move->guide_disp = -1;
|
||||
|
@ -208,65 +246,34 @@ void
|
|||
move_tool_motion (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
gpointer gdisp_ptr)
|
||||
|
||||
{
|
||||
MoveTool *private;
|
||||
GDisplay *gdisp;
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
MoveTool *private;
|
||||
int x, y;
|
||||
|
||||
private = tool->private;
|
||||
gdisp = gdisp_ptr;
|
||||
private = tool->private;
|
||||
|
||||
if (private->guide)
|
||||
{
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
|
||||
&x, &y, TRUE, FALSE);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, 0, mevent->y,
|
||||
&x, &private->guide->position,
|
||||
TRUE, FALSE);
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
private->guide->position = y;
|
||||
else
|
||||
private->guide->position = x;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
}
|
||||
}
|
||||
else if (private->guide->orientation == VERTICAL_GUIDE)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, 0,
|
||||
&private->guide->position, &y,
|
||||
TRUE, FALSE);
|
||||
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
}
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
move_tool_cursor_update (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
|
|
|
@ -127,6 +127,43 @@ move_tool_button_press (Tool *tool,
|
|||
|
||||
}
|
||||
|
||||
static void
|
||||
move_draw_guide (GDisplay *gdisp, Guide *guide)
|
||||
{
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
int x, y;
|
||||
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
|
||||
if (guide->position == -1)
|
||||
return;
|
||||
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width,
|
||||
gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
switch (guide->orientation) {
|
||||
case HORIZONTAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, 0, guide->position, &x1, &y, FALSE);
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
break;
|
||||
case VERTICAL_GUIDE:
|
||||
gdisplay_transform_coords (gdisp, guide->position, 0, &x, &y1, FALSE);
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
move_tool_button_release (Tool *tool,
|
||||
GdkEventButton *bevent,
|
||||
|
@ -175,6 +212,7 @@ move_tool_button_release (Tool *tool,
|
|||
|
||||
if (remove_guide)
|
||||
{
|
||||
move_draw_guide (gdisp, move->guide);
|
||||
move->guide->position = -1;
|
||||
move->guide = NULL;
|
||||
move->guide_disp = -1;
|
||||
|
@ -208,65 +246,34 @@ void
|
|||
move_tool_motion (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
gpointer gdisp_ptr)
|
||||
|
||||
{
|
||||
MoveTool *private;
|
||||
GDisplay *gdisp;
|
||||
int x1, y1;
|
||||
int x2, y2;
|
||||
int w, h;
|
||||
MoveTool *private;
|
||||
int x, y;
|
||||
|
||||
private = tool->private;
|
||||
gdisp = gdisp_ptr;
|
||||
private = tool->private;
|
||||
|
||||
if (private->guide)
|
||||
{
|
||||
if (!move_gc)
|
||||
move_create_gc (gdisp);
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, 0, &x1, &y1, FALSE);
|
||||
gdisplay_transform_coords (gdisp, gdisp->gimage->width, gdisp->gimage->height, &x2, &y2, FALSE);
|
||||
gdk_window_get_size (gdisp->canvas->window, &w, &h);
|
||||
|
||||
if (x1 < 0) x1 = 0;
|
||||
if (y1 < 0) y1 = 0;
|
||||
if (x2 > w) x2 = w;
|
||||
if (y2 > h) y2 = h;
|
||||
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, mevent->y,
|
||||
&x, &y, TRUE, FALSE);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, 0, mevent->y,
|
||||
&x, &private->guide->position,
|
||||
TRUE, FALSE);
|
||||
if (private->guide->orientation == HORIZONTAL_GUIDE)
|
||||
private->guide->position = y;
|
||||
else
|
||||
private->guide->position = x;
|
||||
|
||||
gdisplay_transform_coords (gdisp, 0, private->guide->position, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x1, y, x2, y);
|
||||
}
|
||||
}
|
||||
else if (private->guide->orientation == VERTICAL_GUIDE)
|
||||
{
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
|
||||
if (mevent)
|
||||
{
|
||||
gdisplay_untransform_coords (gdisp, mevent->x, 0,
|
||||
&private->guide->position, &y,
|
||||
TRUE, FALSE);
|
||||
|
||||
gdisplay_transform_coords (gdisp, private->guide->position, 0, &x, &y, FALSE);
|
||||
gdk_draw_line (gdisp->canvas->window, move_gc, x, y1, x, y2);
|
||||
}
|
||||
move_draw_guide (gdisp, private->guide);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
move_tool_cursor_update (Tool *tool,
|
||||
GdkEventMotion *mevent,
|
||||
|
|
Loading…
Reference in New Issue