Commit Graph

387 Commits

Author SHA1 Message Date
Stefan Schippers ebfcde42de change preprocessor defined(HAS_CAIRO) to HAS_CAIRO==1 2023-04-09 15:36:06 +02:00
stefan schippers d2d9eaa4e8 instance attribute "hide=true" will make the instance display as a bounding box only 2023-03-10 04:42:21 +01:00
stefan schippers 3b41a486f6 avoid executing fullyzoom xschem command if no data loaded 2023-02-26 13:56:52 +01:00
stefan schippers 0a015f25db add create_graph.tcl example procedure 2023-02-26 13:39:57 +01:00
stefan schippers 94fee133ca add commands xschem setprop rect 2 <n> fullxzoom and fullyzoom 2023-02-26 13:07:14 +01:00
stefan schippers b162ecdf48 remove unused parameter in setup_graph_data() 2023-02-26 11:22:19 +01:00
stefan schippers a8aaf996e7 use pre-increment where expression is not used 2023-02-18 09:44:11 +01:00
stefan schippers c51f007da3 table_read(): skip initial empty lines, allow 2 or more blank lines for new dataset 2023-02-10 03:36:29 +01:00
stefan schippers 42c3024eda remove debug allocation IDs 2023-02-09 21:06:27 +01:00
stefan schippers 3be9a66aed fix memory leak in table_read() 2023-02-09 21:04:22 +01:00
stefan schippers 09868a0782 put a typedef in xschem.h to avoid duplicate declarations. add env tcl to global list in proc simulate 2023-02-06 14:36:24 +01:00
stefan schippers 6e524624e7 fix wrong closest wave finding ("t" keybind in graphs) 2023-02-03 03:35:55 +01:00
stefan schippers 1da5e47d4a remove my*() allocation routines unique IDs and replace with _ALLOC_ID_ macro, to be substituted in debug sessions with create_alloc_ids.awk 2023-01-23 15:42:15 +01:00
stefan schippers c8a60b4ee4 better image bbox calculation for svg and ps 2023-01-20 13:25:23 +01:00
stefan schippers af0ddb76f0 cleanups, remove redundant png_reader() definition 2023-01-17 01:23:34 +01:00
rafmag 9105bef5f5 Fixed issues with rotating and fliping images + other bugs 2023-01-16 11:33:59 -07:00
stefan schippers 249fdd69a2 temporary fix for building xschem. Some warnings due to rev >c89 to be fixed, and proper detection of libjpeg must be added 2023-01-16 12:21:35 +01:00
stefan schippers 115f0fdf0c improve cairo draw options 2023-01-11 12:02:21 +01:00
stefan schippers 4c0d5023f5 allow 0 width lines (faster device dependent implementation) if user defined line width is set (to 0), add devices/title-3.sym 2023-01-07 11:28:28 +01:00
stefan schippers aa70d90c46 fix cairo font reference counting 2022-12-25 23:13:59 +01:00
stefan schippers 75fbb76543 optimization: split cairo font creation into create + set 2022-12-25 10:42:07 +01:00
stefan schippers e01f545567 --diff option to visually compare two different (versions of) schematics 2022-12-13 13:51:33 +01:00
stefan schippers b23988ccdf added commented lines for antialiasing; JL:cairo_set_line_width should only be called with has_x as xctx->cairo_ctx and xctx->cairo_save_ctx is NULL when run with -x; JL:XCopyArea must be called to draw correctly with Cairo on Windows 2022-12-02 16:43:01 +01:00
stefan schippers f18ed49f6f adjust dash line threshold for graphs 2022-12-02 00:13:54 +01:00
stefan schippers babc6d7e82 huge graphic speed improvement for dashed lines (graph grid) on some GPUs 2022-12-01 16:30:02 +01:00
stefan schippers 7ae10bd7da add macro DRAW_ALL_CAIRO: if set to 1 graphics primitives will use cairo instead of Xlib. Currently work in progress, as of now only the grid and the final XCopyArea done in draw() will use Cairo if macro is set 2022-11-30 00:59:45 +01:00
Stefan Frederik ca8ffafe8a code refactoring (update_conn_cues()) 2022-11-07 14:23:57 +01:00
Stefan Frederik 8f055ebb5f only_probes: dim toward light grey if light colorscheme is in use 2022-11-07 14:03:27 +01:00
Stefan Frederik faaa79d35a dim schematic to grey if showing only probes, instead of hiding it completely 2022-11-07 13:34:48 +01:00
Stefan Frederik 153929806b fill attribute on rectangles to override layer fill style: fill=false will not fill 2022-10-29 23:49:00 +02:00
Stefan Frederik cb652adb5f skip NULL or empty texts in draw_symbol, translate2() skip @@... and @#... tokens (return empty) 2022-10-21 17:48:54 +02:00
Stefan Frederik 3c4d9e99fb allow changing start color in rainbow multi-dataset graphs 2022-10-13 19:33:30 +02:00
Stefan Frederik 4833f126f7 fix axis start label positioning (axis_start() and axis_within_range()) 2022-10-13 17:36:42 +02:00
Stefan Frederik 86e8ee2aae added rainbow checkbutton for multicolor waves in case of multiple datasets 2022-10-13 01:00:55 +02:00
Stefan Frederik 7a1fbb4809 better check_unique_names() and hash_all_names() implementation (do not skip label instances or instances with no format attr). Button click focuses main drawing window even if autofocus_mainwindow is set to 0, to avoid losing keyboard focus forever if TAB is pressed. 2022-10-12 11:56:02 +02:00
Stefan Frederik 6b4ce14e7d some refactoring of tcl globals, engineering format in cursor display (on unscaled axes) 2022-09-29 14:22:33 +02:00
Stefan Frederik ae4b74f2d8 graph axes in engineering notation (20u, 10p, 3k), fix an issue in graph panning with button1 mouse; ngspice:: get_current, get_voltage, get_diff_voltage, get_node embedded into xschem.tcl, to_eng tcl procedure to convert number to engineering form. 2022-09-28 19:14:31 +02:00
Stefan Frederik 25f0334110 resize some widgets, add femto and tera for x/y axis units 2022-09-27 10:09:51 +02:00
Stefan Frederik 3e6815ccc5 recent components are in paned window (can be resized) 2022-09-27 09:27:39 +02:00
Stefan Frederik fd72e72dba test and got svg_embedded_graph(...) to work on Windows with Cairo (Joanne). added some #ifndef __unix__ guards to avoid compiler warnings about defined and not used functions, initial implementation of "Recent components" browser. 2022-09-25 21:11:52 +02:00
Stefan Frederik 314acbabda allow tabs and newlines in graph expressions in addition to spaces; updated example schematics 2022-09-23 02:18:51 +02:00
Stefan Frederik 3e2bc9f95e added "Annotate operating point" into Simulation menu 2022-09-22 19:47:25 +02:00
Stefan Frederik 9c89a08111 better backannotation info placement in net labels, fixes in translate() for @spice_get_voltage and @spice_get_current, fixes in ngspice_backannotate routines. 2022-09-21 17:24:16 +02:00
Stefan Frederik e67ff344c8 cleanup/rename some xctx variables and graph-related functions, avoid drawing graphs using data file loaded from from schematics that are unmatched with current schematic or up in the hierarchy levels 2022-09-21 11:25:45 +02:00
Stefan Frederik c695c435d2 move initialization of s=0 outside the loop in backannotate_at_cursor_b_pos(). If only_probes is set do not display graphs and images. 2022-09-20 17:59:01 +02:00
Stefan Frederik af475e00df xschem raw_read accepts an optional type argument after file name (tran, ac, dc, op, ...) to select type of simulation to load from raw file. New command xschem annotate_op will replace ngspice::annotate tcl procedure. 2022-09-20 16:49:42 +02:00
Stefan Frederik ad6cbb4df6 let cursor graph backannotation work for multiple sweeps (implicit datasets) 2022-09-18 23:29:48 +02:00
Stefan Frederik c06034e33e performance optimization in live cursor b backannotation 2022-09-18 11:06:48 +02:00
Stefan Frederik 96f80d1d33 Alt-a in graph annotates schematic with values at cursor b position. Simulation->Live annotate option to automatically update schematic probes if cursor moved. Some improvements and fixes in ngspice_annotate.tcl. Fix xschem setprobe command. Added missing housekeeping_ctx when a new tab is created. housekeeping_ctx: added more variables to sync. 2022-09-18 05:29:16 +02:00
Stefan Frederik 52405a29c7 restructured graph dialog box, added min/max x, adjusted sweep variables vertical aligmnent, added atof_spice() that recognizes spice suffixes (12p, 4.2MEG etc) 2022-09-16 17:01:59 +02:00
Stefan Frederik f286b376f7 do not show bboxes of hidden texts while moving objects if global option "show hidden texts" is not set; documentation updates 2022-09-16 13:19:26 +02:00
Stefan Frederik 7d6b33cda8 limit max size of embedded graph bitmaps in svg export. added deriv0() graph function, does derivative w.r.t. index 0 (sweep) variable, regardless of graph sweep (x axis) variable. 2022-09-16 12:16:26 +02:00
Stefan Frederik decf7d9d2e add #if conditions for svg_embedded_graph() 2022-09-15 20:16:35 +02:00
Stefan Frederik f644ce58a6 graphs are now rendered (as detailed png bitmaps) in svg exports 2022-09-15 19:39:16 +02:00
Stefan Frederik 6effda2bfc fix find_closest_dataset() if log scale axes are used 2022-09-13 13:39:25 +02:00
Stefan Frederik 9c636cbee1 fixed a possible out of bound array writing (crash) on malformed graph bussed nodes in get_bus_idx_array() 2022-09-10 01:39:30 +02:00
Stefan Frederik f78fc5494d set_text_custom_font xctx->cairo_ctx can be NULL when netlisting without X with 0_examples_top.sch; net_name(..) doesnt work on duplicate pin for test_doublepin.sch so added back the condition in rev 2243; added HAS_CAIRO directive to compile on Windows that dont have CAIRO turned on.
remove some old unused variables
2022-09-08 20:58:12 +02:00
Stefan Frederik 02c1dce486 zomm area in graphs: if dragging backward (in x direction) reverse x axis. 2022-09-04 01:09:05 +02:00
Stefan Frederik ae1bed65f4 added [t]rack bindkey in graph to display the wave closest to mouse in multiple dataset plots 2022-09-02 17:11:50 +02:00
Stefan Frederik 41acfd91dd some small code refactoring, allow multiple selected (bold) waves, one per graph, store the bold waves into file 2022-08-27 12:56:33 +02:00
Stefan Frederik cc49909282 better clip off-graph data 2022-08-14 15:05:08 +02:00
Stefan Frederik edf185616b Y log axis option in graphs 2022-08-08 01:18:42 +02:00
Stefan Frederik 8383030afa remove printing `[Mag]` on wave labels in AC plots. 2022-08-05 19:07:42 +02:00
Stefan Frederik 15e367ba73 user selectable log X scale instead of assiming log X for AC analyses only 2022-08-05 00:57:03 +02:00
Stefan Frederik 3b0589d2d1 store just magnitude and phase of AC vectors instead of dB and phase. Add db20() function to get dB values from magnitude in graph RPN expressions. 2022-08-03 17:44:53 +02:00
Stefan Frederik bd8c1fd6eb do not accept 0 in graph `X div` and `Y div` textboxes, as this will cause an endless loop 2022-08-03 10:44:34 +02:00
Stefan Frederik c9d16d6008 use 5 significant digits in graph (time) measures 2022-06-29 11:47:10 +02:00
Stefan Frederik cd7eb3ab54 update license info 2022-06-24 00:36:12 +02:00
Stefan Frederik f882918931 more conversion warnings suppressed 2022-04-28 10:12:16 +02:00
Stefan Frederik 97911fe9fc text routines: longest_line made double (from int) for consistency 2022-04-28 00:00:51 +02:00
Stefan Frederik 23102433c2 fixed lot of conversion warnings/ bugs (int/double/size_t) 2022-04-27 13:18:45 +02:00
Stefan Frederik 19d9d8a8f1 global Options menu "show hidden texts" to show or not show texts with attribute "hide=true" 2022-03-09 00:29:16 +01:00
Stefan Frederik 00de54c582 Honor hide attribute for texts in ps/pdf and svg exports 2022-03-01 19:36:08 +01:00
Stefan Frederik c1a92ab5dc revert pro floaters. black hole, wrong approach 2022-02-22 12:09:04 +01:00
Stefan Frederik 2a205d298a TEXT_TRANSLATE flag: pro-floaters addition 2022-02-22 01:28:19 +01:00
Stefan Frederik 8be5ae7eb0 hide attribute for text items, not only if embedded in symbols 2022-02-21 10:53:06 +01:00
Stefan Frederik d457565c2d declared more functions static where possible and appropriate 2022-02-19 14:31:55 +01:00
Stefan Frederik 414cba1623 smaller threshold for minimum polygon size drawing 2022-02-19 03:59:00 +01:00
Stefan Frederik 1d8fe237ce add test_extracted_netlist circuit example 2022-02-18 15:11:44 +01:00
Stefan Frederik fc6268395b dedicated function for calculating y extent of custom wave equations 2022-02-17 01:22:15 +01:00
Stefan Frederik f4ff14fbd8 fix bus msb nibble calculation in case of incomplete MSB nibble. Add sigma delta adc example 2022-02-16 02:27:57 +01:00
Stefan Frederik a9987b9be2 better y label alignment in digital graphs 2022-02-15 23:50:50 +01:00
Stefan Frederik 1ba83016c6 better digital graph label positioning (margin to y axis) 2022-02-15 18:57:40 +01:00
Stefan Frederik ce136d8f00 cleared some comments 2022-02-15 18:00:31 +01:00
Stefan Frederik e3fe1029cd switch statements vs if-else-if in plot_raw_custom_data(); do not try to measure non existing waveforms due to expression syntax errors 2022-02-14 22:32:45 +01:00
Stefan Frederik c08cc359f3 plot_raw_custom_data() returns idx or -1 in case of expr syntax errors to avoid plotting junk 2022-02-14 19:28:24 +01:00
Stefan Frederik 59fe63cb68 swap evaluation order in if() 2022-02-14 18:56:51 +01:00
Stefan Frederik 4ebf3ea601 allow wave alias naming, fix off-by-one errors in plot_raw_custom_data() calls 2022-02-14 17:51:18 +01:00
Stefan Frederik b95d78734f allow ";" in addition to "," for separator in nodes to be plotted. ";" will be used for node alias. Fix potential uninitialzed data in get_bus_idx_array() 2022-02-13 22:54:28 +01:00
Stefan Frederik 13aca67a4d find_nth() generalized to accept multiple separators 2022-02-13 11:24:38 +01:00
Stefan Frederik c6a7d8f9bb optimize custom data plots and expression evaluation, added avg() 2022-02-12 13:20:24 +01:00
Stefan Frederik defd2a92a7 rpn expressions in graphs 2022-02-12 04:55:02 +01:00
Stefan Frederik a0e7a9ed78 same refactoring for bus wave drawing (set_thick_waves()) 2022-02-07 16:21:06 +01:00
Stefan Frederik f08d980558 graph function refactoring (set_thick_waves()) 2022-02-07 16:14:52 +01:00
Stefan Frederik e37d5a28b8 more flexible my_strtok_r (handle quoting and escapes), allow quoted expressions in graphs for doing math on vectors 2022-02-07 03:52:42 +01:00
Stefan Frederik 62766fd618 cleanup test code for custom plots 2022-02-05 02:16:27 +01:00
Stefan Frederik d6d932e730 fix save simconf (thanks mkk). put template code for custom function plots 2022-02-05 00:28:06 +01:00
Stefan Frederik 1cb9645e9f xyce quircks/integration for ac analysis, refuse to stretch unscalable images, more example schematics 2022-02-03 00:40:59 +01:00
Stefan Frederik 008b289e4f ac analysis in graphs (mag + phase, log axis) 2022-02-02 18:33:16 +01:00
Stefan Frederik a8e1a6c047 fix regression (tcl context was not saved/restored correctly) 2022-02-02 00:11:46 +01:00
Stefan Frederik e7ebb2c2af Xyce support for node/current probing to graph 2022-01-31 00:14:34 +01:00
Stefan Frederik a79af0c7e5 send currents to graph 2022-01-30 14:39:11 +01:00
Stefan Frederik faa210fb2f code cleanup, removed code redundancy, itoa(), dtoa() functions, removed unnecessary tcl graph_* global vars, mstrcat function. 2022-01-30 03:10:09 +01:00
Stefan Frederik 552bfcac4e better label text size calculation in digital graphs 2022-01-29 02:52:26 +01:00
Stefan Frederik c083491738 probe nodes from xschem into its own wave viewer 2022-01-29 02:36:54 +01:00
Stefan Frederik 0b0e749801 Graph UI improvements. Persistent bold waves. Graph UI bug fixes 2022-01-28 04:44:07 +01:00
Stefan Frederik ee263197d8 bold clicked wave for better visibility if multiple waves 2022-01-27 21:14:52 +01:00
Stefan Frederik 038ef39bb5 UI improvements for graphs, change colors, insert waves etc 2022-01-27 20:47:27 +01:00
Stefan Frederik f5fd1ef352 use cairo png export if Xrender extensions present (alpha), editprop code for graph node list 2022-01-26 15:20:00 +01:00
Stefan Frederik b978bd90fa images (rotated,flipped as the symbol) in symbols 2022-01-24 22:58:30 +01:00
Stefan Frederik 348802c655 fix clipping for image redraw speed-up, embedded raster png/jpg in svg exports 2022-01-23 22:41:24 +01:00
Stefan Frederik c8ec7a77f2 allow embedding all image formats if a xxx-->png filter shell command is provided as attribute 2022-01-23 04:51:41 +01:00
Stefan Frederik 81a612d5a3 menu entry for adding pictures, added alpha parameter for opacity 2022-01-22 04:55:59 +01:00
Stefan Frederik 320ad6e2aa embedded raw file storage 2022-01-21 19:17:43 +01:00
Stefan Frederik 7ee2c1bbc9 protect more new cairo code with #if HAS_CAIRO==1 2022-01-21 03:00:23 +01:00
Stefan Frederik 694bda1250 protect new cairo code with #if HAS_CAIRO==1 2022-01-21 02:51:58 +01:00
Stefan Frederik e66abe36fa fix wave panning if a non graph added, better error reporting in png writer function, better flags option names for special objejcts (image and graphs) 2022-01-21 02:16:51 +01:00
Stefan Frederik a3ccc094f5 handle errors in image data, modified base64 decode to handle white space 2022-01-20 18:28:29 +01:00
Stefan Frederik 3958faf1aa optimizations in image display, resolved some false leak report due to untracked mallocs 2022-01-20 00:47:15 +01:00
Stefan Frederik c3af523559 better data struct for embedded image 2022-01-19 23:28:19 +01:00
Stefan Frederik f7b6bdb937 useful coments added 2022-01-19 18:44:13 +01:00
Stefan Frederik d22245b33a show and store embedded (png) images in schematics 2022-01-19 18:39:23 +01:00
Stefan Frederik 03c5330c94 fix wrong #ifdef instead of #if in psprint 2022-01-19 12:15:33 +01:00
Stefan Frederik 1fb23208bc remove all xrender and all xcb code, remove detection as well. Fix a couple of potentially uninitialized variables 2022-01-19 00:49:46 +01:00
Stefan Frederik 2e8bd72faf reverted xcb since text quality is slightly better 2022-01-18 03:37:54 +01:00
Stefan Frederik acae16d106 left anchor window title in tab buttons 2022-01-13 15:40:20 +01:00
Stefan Frederik 6c85ceaad8 "hide(=true)" attribute to hide specific text items in symbols 2022-01-13 12:46:55 +01:00
Stefan Frederik e238f571b0 code added for tabbed window interface 2022-01-09 05:14:25 +01:00
Stefan Frederik 536ff68143 optimizations in waves measure function 2022-01-08 01:16:13 +01:00
Stefan Frederik d9a51e4b1a bus value viewer show transitions (`X`), adding some query commands to get/set waveform attributes/plot data 2022-01-07 01:54:41 +01:00
Stefan Frederik 6297d1ac15 fix bus value calculation 2022-01-06 12:57:31 +01:00
Stefan Frederik fdf93666b4 fix the hardest bug ever in master graph x-axis zooming (f**k!) 2022-01-06 07:37:44 +01:00
Stefan Frederik 8eae5398c5 fix clipping cursor texts 2022-01-06 05:34:42 +01:00
Stefan Frederik 9bdac2d854 fix horizontal alignment when panning multiple graphs 2022-01-06 05:00:24 +01:00
Stefan Frederik bff65b662a performance improvements (2) in draw_graph functions 2022-01-06 04:17:16 +01:00
Stefan Frederik c3f59beec1 performance improvements in draw_graph functions 2022-01-06 03:56:11 +01:00
Stefan Frederik 7f1a085656 performance improvements in draw_graph functions 2022-01-06 03:49:18 +01:00
Stefan Frederik 223b9dc0a6 various regressions due to refactoring fixed 2022-01-06 01:10:06 +01:00
Stefan Frederik c35d7b5d22 created Graph_ctx for graph data access; code refactoring 2022-01-05 23:07:08 +01:00
Stefan Frederik 09d8474a2c fix measure data in multiple sweep/wraps graphs 2022-01-05 17:38:01 +01:00
Stefan Frederik 4a705de9d0 better top/bottom clipping of waves 2022-01-04 06:21:50 +01:00
Stefan Frederik 31ba4ce0d6 added wave @ cursor measurement feature 2022-01-04 05:54:25 +01:00
Stefan Frederik 625495e27a measurement tooltip in graphs 2022-01-03 18:43:34 +01:00
Stefan Frederik 6aeb5ce4f8 nodes to plot are accepted without v(): v(nnn) --> nnn 2022-01-03 04:02:41 +01:00
Stefan Frederik 96f3914788 better zooming vertical axis of digital waves 2022-01-03 03:05:15 +01:00
Stefan Frederik 177f38ec2f better zooming vertical axis of digital waves 2022-01-03 02:38:38 +01:00
Stefan Frederik 55ad045669 checks for zero range axes, removed some unused function params 2022-01-03 02:30:10 +01:00
Stefan Frederik 33ecb08c4f checks for zero range axes, removed some unused function params 2022-01-03 02:28:34 +01:00
Stefan Frederik 81cbbfa39f better vertical scrolling of digital graphs 2022-01-03 00:27:15 +01:00
Stefan Frederik 104d0f8cc3 fixes for digital waves y axis scaling 2022-01-02 22:24:44 +01:00