From d423545cccdd1c2ad8f2eaf13a4c19033e835ac0 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 24 Dec 2021 21:17:52 +0100 Subject: [PATCH] fix: missing graph borders --- XSchemWin/XSchemWix/Product.wxs | 8 + XSchemWin/XSchemWix/heat_doc.wxs | 534 +-- XSchemWin/XSchemWix/heat_xschem_library.wxs | 3468 +++++++++---------- src/callback.c | 2 +- src/draw.c | 13 +- src/scheduler.c | 14 +- src/utile/utile.tcl | 8 +- src/xschem.tcl | 12 +- 8 files changed, 2039 insertions(+), 2020 deletions(-) diff --git a/XSchemWin/XSchemWix/Product.wxs b/XSchemWin/XSchemWix/Product.wxs index 4f5c5a3c..f55263cd 100644 --- a/XSchemWin/XSchemWix/Product.wxs +++ b/XSchemWin/XSchemWix/Product.wxs @@ -286,6 +286,12 @@ + + + + + + @@ -356,6 +362,8 @@ + + diff --git a/XSchemWin/XSchemWix/heat_doc.wxs b/XSchemWin/XSchemWix/heat_doc.wxs index 8381115b..e46e69d9 100644 --- a/XSchemWin/XSchemWix/heat_doc.wxs +++ b/XSchemWin/XSchemWix/heat_doc.wxs @@ -3,808 +3,808 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/XSchemWin/XSchemWix/heat_xschem_library.wxs b/XSchemWin/XSchemWix/heat_xschem_library.wxs index fb24e65b..710f3811 100644 --- a/XSchemWin/XSchemWix/heat_xschem_library.wxs +++ b/XSchemWin/XSchemWix/heat_xschem_library.wxs @@ -3,5231 +3,5231 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/callback.c b/src/callback.c index 5faa5f03..f6e7ec4a 100644 --- a/src/callback.c +++ b/src/callback.c @@ -280,7 +280,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int } } - if(need_redraw) draw_graph(c, n, 1); /* draw data in each graph box */ + if(need_redraw) draw_graph(c, n, 3); /* draw data in each graph box */ } draw_selection(xctx->gc[SELLAYER], 0); diff --git a/src/draw.c b/src/draw.c index a7a8c0ed..6677fe1b 100644 --- a/src/draw.c +++ b/src/draw.c @@ -1837,8 +1837,10 @@ void draw_graph(int c, int i, int flags) txtsizelab = marginy / 100; /* background */ - filledrect(0, NOW, rx1, ry1, rx2, ry2); - drawrect(c, NOW, rx1, ry1, rx2, ry2, 1); + if((flags & 2) ) { + filledrect(0, NOW, rx1, ry1, rx2, ry2); + drawrect(c, NOW, rx1, ry1, rx2, ry2, 1); + } /* vertical grid lines */ deltax = axis_increment((wx2 - wx1), divx); @@ -1860,7 +1862,7 @@ void draw_graph(int c, int i, int flags) my_snprintf(lab, S(lab), "%.4g", wx * unitx); draw_string(3, NOW, lab, 0, 0, 1, 0, W_X(wx), y2 + 30 * txtsizex, txtsizex, txtsizex); } - /* first and last box delimiters */ + /* first and last vertical box delimiters */ drawline(2, ADD, W_X(wx1), W_Y(wy2), W_X(wx1), W_Y(wy1), 0); drawline(2, ADD, W_X(wx2), W_Y(wy2), W_X(wx2), W_Y(wy1), 0); /* horizontal grid lines */ @@ -1882,7 +1884,7 @@ void draw_graph(int c, int i, int flags) my_snprintf(lab, S(lab), "%.4g", wy * unity); draw_string(3, NOW, lab, 0, 1, 0, 1, x1 - 2 - 30 * txtsizey, W_Y(wy), txtsizey, txtsizey); } - /* first and last box delimiters */ + /* first and last horizontal box delimiters */ drawline(2, ADD, W_X(wx1), W_Y(wy1), W_X(wx2), W_Y(wy1), 0); drawline(2, ADD, W_X(wx1), W_Y(wy2), W_X(wx2), W_Y(wy2), 0); /* Horizontal axis (if in viewport) */ @@ -1994,6 +1996,7 @@ void draw_graph(int c, int i, int flags) * 1: do final XCopyArea (copy 2nd buffer areas to screen) * If draw_waves() is called from draw() no need to do XCopyArea, as draw() does it already. * This makes drawing faster and removes a 'tearing' effect when moving around. + * 2: do not draw background (when called from draw() this is already done) */ void draw_waves(int flags) { @@ -2089,7 +2092,7 @@ void draw(void) } if(xctx->enable_layer[c]) for(i=0;irects[c];i++) { xRect *r = &xctx->rect[c][i]; - if(c != 2 || r->flags != 1 /* || !schematic_waves_loaded() */) { + if( (c != 2 || r->flags != 1) || schematic_waves_loaded() ) { drawrect(c, ADD, r->x1, r->y1, r->x2, r->y2, r->dash); filledrect(c, ADD, r->x1, r->y1, r->x2, r->y2); } diff --git a/src/scheduler.c b/src/scheduler.c index a27e4b60..4f50b9ea 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2002,15 +2002,11 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(!strcmp(argv[1], "raw_read")) { cmd_found = 1; - if(argc > 2) { - - - if(schematic_waves_loaded()) { - free_rawfile(); - } else { - free_rawfile(); - read_rawfile(argv[2]); - } + if(schematic_waves_loaded()) { + free_rawfile(); + } else if(argc > 2) { + free_rawfile(); + read_rawfile(argv[2]); } Tcl_ResetResult(interp); } diff --git a/src/utile/utile.tcl b/src/utile/utile.tcl index 1eb2a8a6..98796c11 100755 --- a/src/utile/utile.tcl +++ b/src/utile/utile.tcl @@ -181,7 +181,13 @@ proc help_window {w filename} { } proc translate {f} { - eval exec "utile $f" + global tcl_platform + set OS [lindex $tcl_platform(os) 0] + if {$OS == "Windows"} { + eval exec "utile.bat $f" + } else { + eval exec "utile $f" + } } diff --git a/src/xschem.tcl b/src/xschem.tcl index 8007df7d..cd6f4964 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -1109,12 +1109,18 @@ proc utile_translate {schname} { proc utile_gui {schname} { global netlist_dir debug_var XSCHEM_SHAREDIR - global utile_gui_path utile_cmd_path + global utile_gui_path OS simuldir set tmpname [file rootname "$schname"] - eval exec {sh -c "cd \"$netlist_dir\"; \ - XSCHEM_SHAREDIR=\"$XSCHEM_SHAREDIR\" \"$utile_gui_path\" stimuli.$tmpname"} & + if {$OS == "Windows"} { + eval exec {cmd /V /C "cd $netlist_dir && \ + set XSCHEM_SHAREDIR=$XSCHEM_SHAREDIR&&set GUI_PATH=$utile_gui_path.bat&& \ + !GUI_PATH! stimuli.$tmpname"} + } else { + eval exec {sh -c "cd \"$netlist_dir\"; \ + XSCHEM_SHAREDIR=\"$XSCHEM_SHAREDIR\" \"$utile_gui_path\" stimuli.$tmpname"} & + } } proc utile_edit {schname} {