mirror of https://github.com/GNOME/gimp.git
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:
parent
c5a8b43846
commit
48ebaf8beb
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue