removed (draw|filled).*(.*BEGIN, .*) everywhere as it is not needed (just flush graphics with END is enough)

This commit is contained in:
Stefan Schippers 2020-08-29 12:59:27 +02:00
parent 50ae2f80f8
commit 316ca11e3a
7 changed files with 0 additions and 52 deletions

View File

@ -971,9 +971,6 @@ int place_symbol(int pos, const char *symbol_name, double x, double y, int rot,
/* hilight new element 24122002 */
if(draw_sym & 4 ) {
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
select_element(n, SELECTED,0, 0);
ui_state |= SELECTION;
drawtemparc(gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0, 0.0);
@ -2264,8 +2261,6 @@ void place_text(int draw_text, double mx, double my)
cairo_restore(save_ctx);
}
#endif
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
select_text(lasttext, SELECTED, 0);
drawtemprect(gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0);
drawtempline(gc[SELLAYER], END, 0.0, 0.0, 0.0, 0.0);

View File

@ -133,7 +133,6 @@ void update_conn_cues(int draw_cues, int dr_win)
dbg(3, "update_conn_cues(): check3\n");
if(draw_cues) {
save_draw = draw_window; draw_window = dr_win;
filledarc(WIRELAYER, BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
for(init_wire_iterator(x1, y1, x2, y2); ( wireptr = wire_iterator_next() ) ;) {
i = wireptr->n;
/* optimization when editing small areas (detailed zoom) of a huge schematic */

View File

@ -1491,10 +1491,6 @@ void draw(void)
for(c=0;c<cadlayers;c++)
{
if(draw_single_layer!=-1 && c != draw_single_layer) continue; /* 20151117 */
drawline(c, BEGIN, 0.0, 0.0, 0.0, 0.0);
drawrect(c, BEGIN, 0.0, 0.0, 0.0, 0.0);
drawarc(c, BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
filledrect(c, BEGIN, 0.0, 0.0, 0.0, 0.0);
for(i=0;i<lastline[c];i++)
drawline(c, ADD, line[c][i].x1, line[c][i].y1, line[c][i].x2, line[c][i].y2);
@ -1590,8 +1586,6 @@ void draw(void)
drawline(c, END, 0.0, 0.0, 0.0, 0.0);
}
if(draw_single_layer==-1 || draw_single_layer==WIRELAYER){ /* 20151117 */
drawline(WIRELAYER,BEGIN, 0.0, 0.0, 0.0, 0.0);
filledrect(WIRELAYER, BEGIN, 0.0, 0.0, 0.0, 0.0);
if(use_hash) {
dbg(3, "using spatial hash table iterator\n");
@ -1635,10 +1629,6 @@ void draw(void)
}
#endif
#ifndef HAS_CAIRO
drawline(textlayer,BEGIN, 0.0, 0.0, 0.0, 0.0);
drawrect(textlayer,BEGIN, 0.0, 0.0, 0.0, 0.0);
#endif
draw_string(textlayer, ADD, textelement[i].txt_ptr,
textelement[i].rot, textelement[i].flip, textelement[i].hcenter, textelement[i].vcenter,
textelement[i].x0,textelement[i].y0,

View File

@ -426,11 +426,6 @@ int search(const char *tok, const char *val, int sub, int sel, int what)
if(regcomp(&re, val , REG_EXTENDED)) return TCL_ERROR;
#endif
dbg(1, "search():val=%s\n", val);
if(sel==1) {
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
}
if(what==ADD || what==NOW) {
if(!sel) { /* 20190525 */
@ -948,10 +943,6 @@ void draw_hilight_net(int on_window)
y2=Y_TO_SCREEN(inst_ptr[i].y2);
if(OUTSIDE(x1,y1,x2,y2,areax1,areay1,areax2,areay2)) continue;
dbg(1, "draw_hilight_net(): instance:%d\n",i);
drawline(inst_color[i], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawrect(inst_color[i], BEGIN, 0.0, 0.0, 0.0, 0.0);
filledrect(inst_color[i], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawarc(inst_color[i], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
/* 20160414 from draw() */
symptr = (inst_ptr[i].ptr+instdef);
if( c==0 || /*draw_symbol call is needed on layer 0 to avoid redundant work (outside check) */

View File

@ -193,9 +193,6 @@ void draw_selection(GC g, int interruptable)
#ifdef HAS_CAIRO
int customfont;
#endif
drawtemparc(g, BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
drawtempline(g, BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(g, BEGIN, 0.0, 0.0, 0.0, 0.0);
if(g == gc[SELLAYER]) lastsel = lastselected;
for(i=0;i<lastsel;i++)
@ -515,10 +512,6 @@ void copy_objects(int what)
for(k=0;k<cadlayers;k++)
{
drawarc(k, BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
drawline(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
drawrect(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
filledrect(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
for(i=0;i<lastselected;i++)
{
c = selectedgroup[i].col;n = selectedgroup[i].n;
@ -927,10 +920,6 @@ void move_objects(int what, int merge, double dx, double dy)
}
for(k=0;k<cadlayers;k++)
{
drawarc(k, BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0, 0);
drawline(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
drawrect(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
filledrect(k, BEGIN, 0.0, 0.0, 0.0, 0.0);
for(i=0;i<lastselected;i++)
{
c = selectedgroup[i].col;n = selectedgroup[i].n;

View File

@ -772,9 +772,6 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
Tcl_AppendResult(interp, "xschem select: missing arguments.", NULL);
return TCL_ERROR;
}
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
if(!strcmp(argv[2],"instance") && argc==4) {
char *endptr;

View File

@ -454,10 +454,6 @@ void unselect_all(void)
ui_state = 0;
lastselected = 0;
drawtemparc(gctiled,BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
drawtempline(gctiled,BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gctiled, BEGIN, 0.0, 0.0, 0.0, 0.0);
for(i=0;i<lastwire;i++)
{
if(wire[i].sel)
@ -832,9 +828,6 @@ unsigned short select_object(double mousex,double mousey, unsigned short select_
Selected sel;
sel = find_closest_obj(mousex,mousey);
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
dbg(1, "select_object(): sel.n=%d, sel.col=%d, sel.type=%d\n", sel.n, sel.col, sel.type);
switch(sel.type)
@ -880,9 +873,6 @@ void select_inside(double x1,double y1, double x2, double y2, int sel) /* 201509
#ifdef HAS_CAIRO
int customfont;
#endif
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
for(i=0;i<lastwire;i++)
{
@ -1050,9 +1040,6 @@ void select_all(void)
{
int c,i;
drawtemparc(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0, 0.0);
drawtempline(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
drawtemprect(gc[SELLAYER], BEGIN, 0.0, 0.0, 0.0, 0.0);
ui_state |= SELECTION;
for(i=0;i<lastwire;i++)
{