add `xschem set cursor[12]_x` commands for moving graph cursors
This commit is contained in:
parent
d64f4a3fc2
commit
39769187d3
|
|
@ -541,6 +541,7 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li><kbd> abort_operation</kbd></li><pre>
|
||||
|
|
@ -1225,6 +1226,8 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
<li><kbd> cadsnap </kbd> set mouse snap (default: 10) </li>
|
||||
<li><kbd> color_ps </kbd> set color psoscript (1 or 0) </li>
|
||||
<li><kbd> constrained_move </kbd> set constrained move (1=horiz, 2=vert, 0=none) </li>
|
||||
<li><kbd> cursor1_x </kbd> set graph cursor1 position </li>
|
||||
<li><kbd> cursor2_x </kbd> set graph cursor2 position </li>
|
||||
<li><kbd> draw_window </kbd> set drawing to window (1 or 0) </li>
|
||||
<li><kbd> fix_broken_tiled_fill </kbd> alternate drawing method for broken GPUs </li>
|
||||
<li><kbd> fix_mouse_coord </kbd> fix for wrong mouse coords in RDP software </li>
|
||||
|
|
@ -1454,7 +1457,6 @@ C {verilog_timescale.sym} 1050 -100 0 0 {name=s1 timestep="1ns" precision="1ns"
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -4135,6 +4135,28 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg
|
|||
else if(!strcmp(argv[2], "constrained_move")) { /* set constrained move (1=horiz, 2=vert, 0=none) */
|
||||
constrained_move = atoi(argv[3]);
|
||||
}
|
||||
else if(!strcmp(argv[2], "cursor1_x")) { /* set graph cursor1 position */
|
||||
xctx->graph_cursor1_x = atof(argv[3]);
|
||||
|
||||
if(xctx->rects[GRIDLAYER] > 0) {
|
||||
Graph_ctx *gr = &xctx->graph_struct;
|
||||
xRect *r = &xctx->rect[GRIDLAYER][0];
|
||||
if(r->flags & 1) {
|
||||
backannotate_at_cursor_b_pos(r, gr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!strcmp(argv[2], "cursor2_x")) { /* set graph cursor2 position */
|
||||
xctx->graph_cursor2_x = atof(argv[3]);
|
||||
|
||||
if(xctx->rects[GRIDLAYER] > 0) {
|
||||
Graph_ctx *gr = &xctx->graph_struct;
|
||||
xRect *r = &xctx->rect[GRIDLAYER][0];
|
||||
if(r->flags & 1) {
|
||||
backannotate_at_cursor_b_pos(r, gr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(!strcmp(argv[2], "draw_window")) { /* set drawing to window (1 or 0) */
|
||||
if(!xctx) {Tcl_SetResult(interp, not_avail, TCL_STATIC); return TCL_ERROR;}
|
||||
xctx->draw_window=atoi(argv[3]);
|
||||
|
|
|
|||
|
|
@ -491,14 +491,11 @@ foreach \{n s t\} [xschem instance_list] \{
|
|||
set curr 0
|
||||
if \{$t == \{resistor\} || $t == \{ammeter\} \} \{
|
||||
set curr [expr \{ abs([from_eng [xschem translate $n \{@spice_get_current\}]])\}]
|
||||
\}
|
||||
if \{$t == \{pnp\} || $t == \{npn\}\} \{
|
||||
\} elseif \{$t == \{pnp\} || $t == \{npn\}\} \{
|
||||
set curr [expr \{abs([ngspice::get_current $n\\\\\\[ic\\\\\\]])\}]
|
||||
\}
|
||||
|
||||
if \{$t == \{nmos\}\} \{
|
||||
\} elseif \{$t == \{nmos\}\} \{
|
||||
set curr [expr \{abs([ngspice::get_current $n.rd\\\\\\[i\\\\\\]])\}]
|
||||
\}
|
||||
\} else \{continue\}
|
||||
if \{$curr > 0.02\} \{
|
||||
xschem set hilight_color 11
|
||||
xschem hilight_instname $n fast
|
||||
|
|
|
|||
Loading…
Reference in New Issue