applied gimp-quinet-000427-0, draw the straight line preview in the center

* app/paint_core.c: applied gimp-quinet-000427-0, draw the straight
line preview in the center of the start and end pixels at high zoom
levels.

-Yosh
This commit is contained in:
Manish Singh 2000-05-01 18:10:20 +00:00
parent f750cc0809
commit e35436426b
3 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,9 @@
Mon May 1 10:58:34 PDT 2000 Manish Singh <yosh@gimp.org>
* app/paint_core.c: applied gimp-quinet-000427-0, draw the straight
line preview in the center of the start and end pixels at high zoom
levels.
2000-05-01 Michael Natterer <mitch@gimp.org>
* plug-ins/common/[h-p]*.c: use gimp_ui_init(). Minor cleanups like

View File

@ -628,6 +628,16 @@ paint_core_draw (Tool *tool)
if (tx2 > 0 && ty2 > 0)
{
gint offx, offy;
/* Adjust coords to start drawing from center of pixel if zoom > 1 */
offx = (int) SCALEFACTOR_X (gdisp) >> 1;
offy = (int) SCALEFACTOR_Y (gdisp) >> 1;
tx1 += offx;
ty1 += offy;
tx2 += offx;
ty2 += offy;
/* Draw start target */
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
tx1 - (TARGET_WIDTH >> 1), ty1,

View File

@ -628,6 +628,16 @@ paint_core_draw (Tool *tool)
if (tx2 > 0 && ty2 > 0)
{
gint offx, offy;
/* Adjust coords to start drawing from center of pixel if zoom > 1 */
offx = (int) SCALEFACTOR_X (gdisp) >> 1;
offy = (int) SCALEFACTOR_Y (gdisp) >> 1;
tx1 += offx;
ty1 += offy;
tx2 += offx;
ty2 += offy;
/* Draw start target */
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
tx1 - (TARGET_WIDTH >> 1), ty1,