diff --git a/src/draw.c b/src/draw.c index 8b0494a4..1f47efc9 100644 --- a/src/draw.c +++ b/src/draw.c @@ -519,7 +519,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot, x2=X_TO_SCREEN(xctx->inst[n].x2+xoffset); y1=Y_TO_SCREEN(xctx->inst[n].y1+yoffset); y2=Y_TO_SCREEN(xctx->inst[n].y2+yoffset); - if(OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) + if(RECT_OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) { xctx->inst[n].flags|=1; return; @@ -744,7 +744,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot x2=X_TO_SCREEN(xctx->inst[n].x2+xoffset); y1=Y_TO_SCREEN(xctx->inst[n].y1+yoffset); y2=Y_TO_SCREEN (xctx->inst[n].y2+yoffset); - if(OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) + if(RECT_OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) { xctx->inst[n].flags|=1; return; @@ -3494,9 +3494,11 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) my_free(_ALLOC_ID_, &measure_x); my_free(_ALLOC_ID_, &measure_prev_x); } /* if(flags & 8) */ - bbox(START, 0.0, 0.0, 0.0, 0.0); - bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2); - bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0); + /* + * bbox(START, 0.0, 0.0, 0.0, 0.0); + * bbox(ADD, gr->rx1, gr->ry1, gr->rx2, gr->ry2); + * bbox(SET_INSIDE, 0.0, 0.0, 0.0, 0.0); + */ if(flags & 8) { /* cursor1 */ if((flags & 2)) draw_cursor(xctx->graph_cursor1_x, xctx->graph_cursor2_x, 1, gr); @@ -3507,11 +3509,16 @@ void draw_graph(int i, const int flags, Graph_ctx *gr, void *ct) } if(flags & 1) { /* copy save buffer to screen */ if(!xctx->draw_window) { - MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gc[0], xctx->xrect[0].x, xctx->xrect[0].y, - xctx->xrect[0].width, xctx->xrect[0].height, xctx->xrect[0].x, xctx->xrect[0].y); + /* + * MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gc[0], xctx->xrect[0].x, xctx->xrect[0].y, + * xctx->xrect[0].width, xctx->xrect[0].height, xctx->xrect[0].x, xctx->xrect[0].y); + */ + MyXCopyAreaDouble(display, xctx->save_pixmap, xctx->window, xctx->gc[0], + gr->rx1, gr->ry1, gr->rx2, gr->ry2, gr->rx1, gr->ry1, 0.0); + } } - bbox(END, 0.0, 0.0, 0.0, 0.0); + /* bbox(END, 0.0, 0.0, 0.0, 0.0); */ } /* flags: diff --git a/src/psprint.c b/src/psprint.c index cc4fd167..4218f083 100644 --- a/src/psprint.c +++ b/src/psprint.c @@ -792,7 +792,7 @@ static void ps_draw_symbol(int n,int layer, int what, short tmp_flip, short rot, x2=X_TO_PS(xctx->inst[n].x2); y1=Y_TO_PS(xctx->inst[n].y1); y2=Y_TO_PS(xctx->inst[n].y2); - if(OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) + if(RECT_OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) { xctx->inst[n].flags|=1; return; diff --git a/src/select.c b/src/select.c index 0750566b..8289d1c0 100644 --- a/src/select.c +++ b/src/select.c @@ -1320,7 +1320,7 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /*added u int k, selected_points, flag; polygon_bbox(xctx->poly[c][i].x, xctx->poly[c][i].y, xctx->poly[c][i].points, &xa, &ya, &xb, &yb); - if(OUTSIDE(xa, ya, xb, yb, x1, y1, x2, y2)) continue; + if(RECT_OUTSIDE(xa, ya, xb, yb, x1, y1, x2, y2)) continue; selected_points = 0; flag=0; for(k=0; kpoly[c][i].points; ++k) { @@ -1513,7 +1513,7 @@ void select_touch(double x1,double y1, double x2, double y2, int sel) /*added un int k, flag; polygon_bbox(xctx->poly[c][i].x, xctx->poly[c][i].y, xctx->poly[c][i].points, &xa, &ya, &xb, &yb); - if(OUTSIDE(xa, ya, xb, yb, x1, y1, x2, y2)) continue; + if(RECT_OUTSIDE(xa, ya, xb, yb, x1, y1, x2, y2)) continue; flag=0; for(k=0; kpoly[c][i].points; ++k) { if(xctx->poly[c][i].sel==SELECTED) xctx->poly[c][i].selected_point[k] = 1; diff --git a/src/svgdraw.c b/src/svgdraw.c index acbbd6e8..ce903102 100644 --- a/src/svgdraw.c +++ b/src/svgdraw.c @@ -461,7 +461,7 @@ static void svg_draw_symbol(int c, int n,int layer,short tmp_flip, short rot, x2=X_TO_SVG(xctx->inst[n].x2); y1=Y_TO_SVG(xctx->inst[n].y1); y2=Y_TO_SVG(xctx->inst[n].y2); - if(OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) { + if(RECT_OUTSIDE(x1,y1,x2,y2,xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2)) { xctx->inst[n].flags|=1; return; } diff --git a/src/xschem.h b/src/xschem.h index e9f72d1b..6a869270 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -346,9 +346,6 @@ extern char win_temp_dir[PATH_MAX]; if(y2 < y1) {xxtmp = y1; y1 = y2; y2 = xxtmp;} \ } -#define OUTSIDE(xa,ya,xb,yb,x1,y1,x2,y2) \ - (xa>x2 || xby2 || yb=x2 || xb<=x1 || ( (ya=y2 || yb<=y1) : (yb>=y2 || ya<=y1) ) )