From 41d126b3c61a3c3705747e7a8b9dc2bc3bbb7d9d Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sat, 2 Mar 2024 03:31:24 +0100 Subject: [PATCH] revert: don`t print rectangle bboxes around circles as this createed a black sinkhole and a chain-reaction of issues --- src/actions.c | 3 ++- src/draw.c | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/actions.c b/src/actions.c index 812df473..73842156 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3112,7 +3112,8 @@ void new_arc(int what, double sweep) else if(xctx->nl_state==1) { xctx->nl_x3 = xctx->mousex_snap; xctx->nl_y3 = xctx->mousey_snap; - if(xctx->nl_r>0.) drawtemparc(xctx->gctiled, NOW, xctx->nl_x, xctx->nl_y, xctx->nl_r, xctx->nl_a, xctx->nl_b); + if(xctx->nl_r>0.) + drawtemparc(xctx->gctiled, NOW, xctx->nl_x, xctx->nl_y, xctx->nl_r, xctx->nl_a, xctx->nl_b); arc_3_points(xctx->nl_x1, xctx->nl_y1, xctx->nl_x2, xctx->nl_y2, xctx->nl_x3, xctx->nl_y3, &xctx->nl_x, &xctx->nl_y, &xctx->nl_r, &xctx->nl_a, &xctx->nl_b); if(xctx->nl_sweep_angle==360.) xctx->nl_b=360.; diff --git a/src/draw.c b/src/draw.c index 605ec266..7bf1b31b 100644 --- a/src/draw.c +++ b/src/draw.c @@ -758,7 +758,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot #if HAS_CAIRO==1 int customfont; #endif - + if(xctx->inst[n].ptr == -1) return; if(!has_x) return; @@ -1283,7 +1283,6 @@ void drawtemparc(GC gc, int what, double x, double y, double r, double a, double { static int i=0; static XArc xarc[CADDRAWBUFFERSIZE]; - static XRectangle xr[CADDRAWBUFFERSIZE]; double x1, y1, x2, y2; /* arc bbox */ double xx1, yy1, xx2, yy2; /* complete circle bbox in screen coords */ @@ -1294,7 +1293,6 @@ void drawtemparc(GC gc, int what, double x, double y, double r, double a, double if(i>=CADDRAWBUFFERSIZE) { XDrawArcs(display, xctx->window, gc, xarc,i); - XDrawRectangles(display, xctx->window, gc, xr,i); i=0; } xx1=X_TO_SCREEN(x-r); @@ -1314,10 +1312,6 @@ void drawtemparc(GC gc, int what, double x, double y, double r, double a, double xarc[i].height=(unsigned short)(yy2 - yy1); xarc[i].angle1 = (short)(a*64); xarc[i].angle2 = (short)(b*64); - xr[i].x=(short)x1; - xr[i].y=(short)y1; - xr[i].width=(unsigned short)(x2-xr[i].x); - xr[i].height=(unsigned short)(y2-xr[i].y); ++i; } } @@ -1341,16 +1335,12 @@ void drawtemparc(GC gc, int what, double x, double y, double r, double a, double } else { XDrawArc(display, xctx->window, gc, (int)xx1, (int)yy1, (int)(xx2-xx1), (int)(yy2-yy1), (int)(a*64), (int)(b*64)); - XDrawRectangle(display, xctx->window, gc, (int)sx1, (int)sy1, - (unsigned int)sx2 - (unsigned int)sx1, - (unsigned int)sy2 - (unsigned int)sy1); } } } else if((what & END) && i) { XDrawArcs(display, xctx->window, gc, xarc,i); - XDrawRectangles(display, xctx->window, gc, xr,i); i=0; } }