various fixes related to crosshair mouse display
This commit is contained in:
parent
49aab703b4
commit
7ee11e8dbc
|
|
@ -1380,25 +1380,25 @@ void draw_crosshair(int what)
|
|||
} else {
|
||||
if(xhair_size) {
|
||||
draw_xhair_line(xctx->gctiled, xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) - xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) - xhair_size);
|
||||
X_TO_SCREEN(xctx->prev_crossx) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) - xhair_size,
|
||||
X_TO_SCREEN(xctx->prev_crossx) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) - xhair_size);
|
||||
draw_xhair_line(xctx->gctiled, xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) + xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) + xhair_size);
|
||||
X_TO_SCREEN(xctx->prev_crossx) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) + xhair_size,
|
||||
X_TO_SCREEN(xctx->prev_crossx) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) + xhair_size);
|
||||
draw_xhair_line(xctx->gctiled, xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) - xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) + xhair_size);
|
||||
X_TO_SCREEN(xctx->prev_crossx) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) - xhair_size,
|
||||
X_TO_SCREEN(xctx->prev_crossx) - xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) + xhair_size);
|
||||
draw_xhair_line(xctx->gctiled, xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) - xhair_size,
|
||||
X_TO_SCREEN(xctx->mousex_snap) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->mousey_snap) + xhair_size);
|
||||
X_TO_SCREEN(xctx->prev_crossx) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) - xhair_size,
|
||||
X_TO_SCREEN(xctx->prev_crossx) + xhair_size,
|
||||
Y_TO_SCREEN(xctx->prev_crossy) + xhair_size);
|
||||
} else { /* full screen span xhair */
|
||||
drawtempline(xctx->gctiled, NOW, X_TO_XSCHEM(xctx->areax1),
|
||||
xctx->prev_crossy, X_TO_XSCHEM(xctx->areax2), xctx->prev_crossy);
|
||||
|
|
|
|||
|
|
@ -1196,17 +1196,14 @@ void draw_xhair_line(GC gc, int size, double linex1, double liney1, double linex
|
|||
0, size ? LineSolid : xDashType, xCap, xJoin);
|
||||
} else {
|
||||
XSetLineAttributes (display, gc,
|
||||
XLINEWIDTH(xctx->lw), xDashType, xCap, xJoin);
|
||||
size ? 0 : XLINEWIDTH(xctx->lw), size ? LineSolid : xDashType, xCap, xJoin);
|
||||
}
|
||||
|
||||
if(xctx->draw_window)
|
||||
XDrawLine(display, xctx->window, gc, (int)x1, (int)y1, (int)x2, (int)y2);
|
||||
if(xctx->draw_pixmap)
|
||||
XDrawLine(display, xctx->save_pixmap, gc, (int)x1, (int)y1, (int)x2, (int)y2);
|
||||
if(!big_gr) {
|
||||
XSetLineAttributes (display, gc,
|
||||
XLINEWIDTH(xctx->lw), LineSolid, LINECAP, LINEJOIN);
|
||||
}
|
||||
XSetLineAttributes (display, gc,
|
||||
XLINEWIDTH(xctx->lw), LineSolid, LINECAP, LINEJOIN);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue