app/color_select.c: fix silly bug with off-by-one error in

redraw of crosshair.
	A line of length x has pixels from 0 .. (x-1), not 0 .. x
This commit is contained in:
Austin Donnelly 1998-10-14 22:18:56 +00:00
parent c5a8b43846
commit 48ebaf8beb
3 changed files with 9 additions and 9 deletions

View File

@ -1364,7 +1364,7 @@ color_select_draw_z_marker (ColorSelectP csp,
if (y >= miny && y < height)
{
gdk_gc_set_function (csp->gc, GDK_INVERT);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width - 1, y);
gdk_gc_set_function (csp->gc, GDK_COPY);
}
}
@ -1401,10 +1401,10 @@ color_select_draw_xy_marker (ColorSelectP csp,
}
if (y >= miny && y < height)
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width - 1, y);
if (x >= minx && x < width)
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height);
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height - 1);
gdk_gc_set_function (csp->gc, GDK_COPY);
}

View File

@ -1364,7 +1364,7 @@ color_select_draw_z_marker (ColorSelectP csp,
if (y >= miny && y < height)
{
gdk_gc_set_function (csp->gc, GDK_INVERT);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width - 1, y);
gdk_gc_set_function (csp->gc, GDK_COPY);
}
}
@ -1401,10 +1401,10 @@ color_select_draw_xy_marker (ColorSelectP csp,
}
if (y >= miny && y < height)
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width - 1, y);
if (x >= minx && x < width)
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height);
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height - 1);
gdk_gc_set_function (csp->gc, GDK_COPY);
}

View File

@ -1364,7 +1364,7 @@ color_select_draw_z_marker (ColorSelectP csp,
if (y >= miny && y < height)
{
gdk_gc_set_function (csp->gc, GDK_INVERT);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->z_color->window, csp->gc, minx, y, width - 1, y);
gdk_gc_set_function (csp->gc, GDK_COPY);
}
}
@ -1401,10 +1401,10 @@ color_select_draw_xy_marker (ColorSelectP csp,
}
if (y >= miny && y < height)
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width, y);
gdk_draw_line (csp->xy_color->window, csp->gc, minx, y, width - 1, y);
if (x >= minx && x < width)
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height);
gdk_draw_line (csp->xy_color->window, csp->gc, x, miny, x, height - 1);
gdk_gc_set_function (csp->gc, GDK_COPY);
}