diff --git a/doc/xschem_man/developer_info.html b/doc/xschem_man/developer_info.html index b117c242..2d9ff461 100644 --- a/doc/xschem_man/developer_info.html +++ b/doc/xschem_man/developer_info.html @@ -546,8 +546,6 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns" - - @@ -683,6 +681,9 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns" xschem expandlabel {2*A[3:0]} --> A[3],A[2],A[1],A[0],A[3],A[2],A[1],A[0] 8 last field is the number of bits since [ and ] are TCL special characters argument must be quoted with { and } +
+ After setting tcl array pixdata(n) reset fill patterns on all layers + If 'nodraw' is given do not redraw window.
Set fill type for layer 'n', fill_type may be 'solid' or 'stipple' or 'empty'
If 'nodraw' is given do not redraw window.
@@ -1489,6 +1490,8 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
+
+
diff --git a/src/scheduler.c b/src/scheduler.c
index fe3e498a..186b2981 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -908,11 +908,28 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
else { cmd_found = 0;}
break;
case 'f': /*----------------------------------------------*/
+ /* fill_reset [nodraw]
+ * After setting tcl array pixdata(n) reset fill patterns on all layers
+ * If 'nodraw' is given do not redraw window.
+ */
+ if(!strcmp(argv[1], "fill_reset"))
+ {
+ int dr = 1;
+ if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
+ init_pixdata();
+ free_gc();
+ create_gc();
+ enable_layers();
+ build_colors(0.0, 0.0);
+ resetwin(1, 0, 1, 0, 0); /* recreate pixmap. resetwin(create_pixmap, clear_pixmap, force, w, h) */
+ if(argc > 2 && !strcmp(argv[2], "nodraw")) dr = 0;
+ if(dr) draw();
+ }
/* fill_type n fill_type [nodraw]
* Set fill type for layer 'n', fill_type may be 'solid' or 'stipple' or 'empty'
* If 'nodraw' is given do not redraw window.
*/
- if(!strcmp(argv[1], "fill_type"))
+ else if(!strcmp(argv[1], "fill_type"))
{
int dr = 1;
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
diff --git a/src/xinit.c b/src/xinit.c
index 795c0759..821481ed 100644
--- a/src/xinit.c
+++ b/src/xinit.c
@@ -325,17 +325,39 @@ static void init_color_array(double dim, double dim_bg)
}
}
-static void init_pixdata()/* populate xctx->fill_type array that is used in create_gc() to set fill styles */
+void init_pixdata()/* populate xctx->fill_type array that is used in create_gc() to set fill styles */
{
int i,j, full, empty;
+ const char *tclpixdata;
+ const char *tclword;
+ int found_data;
+
for(i=0;i