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:
@ -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>
|
2000-05-01 Michael Natterer <mitch@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/[h-p]*.c: use gimp_ui_init(). Minor cleanups like
|
* plug-ins/common/[h-p]*.c: use gimp_ui_init(). Minor cleanups like
|
||||||
|
@ -628,6 +628,16 @@ paint_core_draw (Tool *tool)
|
|||||||
|
|
||||||
if (tx2 > 0 && ty2 > 0)
|
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 */
|
/* Draw start target */
|
||||||
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
|
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
|
||||||
tx1 - (TARGET_WIDTH >> 1), ty1,
|
tx1 - (TARGET_WIDTH >> 1), ty1,
|
||||||
|
@ -628,6 +628,16 @@ paint_core_draw (Tool *tool)
|
|||||||
|
|
||||||
if (tx2 > 0 && ty2 > 0)
|
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 */
|
/* Draw start target */
|
||||||
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
|
gdk_draw_line (gdisp->canvas->window, paint_core->core->gc,
|
||||||
tx1 - (TARGET_WIDTH >> 1), ty1,
|
tx1 - (TARGET_WIDTH >> 1), ty1,
|
||||||
|
Reference in New Issue
Block a user