Commit Graph

65 Commits

Author SHA1 Message Date
Tim Edwards 2462d6f220 I discovered that for large designs, running DBWredisplay will take
significant amounts of time even though there is no display to
receive the result.  However, the "suspendall" command only works
if a window exists.  The obvious solution is to set GrDisplayStatus
to DISPLAY_SUSPEND whenever magic is run with the "-dnull" option.
This should help speed up a lot of scripts, in particular where
designs are large.
2021-01-12 12:46:43 -05:00
Dan Moore 8dba03cebf Set GrClosePtr back to NULL before calling MainExit()
to squash the seg fault. It appears that calling GrTkClose
before graphics are fully initialized causes this.
2021-01-04 08:59:20 -05:00
Tim Edwards 75a18053f8 Modified the CIFGenLayer() routine to be aware of when it is called during
hierarchical processing from CIFGenSubcells() and CIFGenArrays(), and to
avoid certain operators that are useless and harmful when applied
hierarchically; namely squares, slots, bbox, boundary, and net.
2020-11-12 10:34:27 -05:00
Tim Edwards 3203eec28c Modified the "bloat-all" cifoutput operator to allow operations on
templayers.  This permits some useful interactions like growing to
the size of a bounding box, or abutment box, as well as many other
possibilities.  Also:  Corrected the use of "cif see" for the boundary
(abutment box) layer, which was not working because the "cif see"
command uses a flattened CellDef that does not have the boundary
property of the cell it was flattened from.
2020-05-26 14:29:36 -04:00
Tim Edwards 2af38a4191 Updates from running the fix-ending-whitespace script. 2020-05-23 17:13:14 -04:00
Tim 'mithro' Ansell 516ae506d7 Remove all the $XXX: YYY$ 2020-05-23 17:00:38 -04:00
Tim Edwards 80fa495103 Removed the Depend files, which were being tracked with .gitignore
pointing to Depend instead of */Depend.
2020-03-13 15:39:08 -04:00
Tim Edwards 06eef6e324 Corrected ext2sim.c calls to hierAP and others using "scale" and
declaring it to be an integer when it is actually a float.  This
will cause magic to crash when using, e.g., "ext2sim -f su".
2020-02-11 10:21:36 -05:00
Tim Edwards 2ca9511152 Added fix for SVG output. This brings back the original behavior
of generating scalable output.  Some libcairo update had caused
the output to use the wrong version of SVG by default, which
generates an SVG-wrapped PNG data block, which is not scalable,
and not what was intended with the "plot svg" command.
2020-02-07 11:38:00 -05:00
Tim 'mithro' Ansell 4f30e76688 Make SVG output actually SVG again.
Currently the SVG output is a SVG file with an embedded `image/png`
file. Restricting to `CAIRO_SVG_VERSION_1_2` means the file goes back to
being a vector.

Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
2020-02-07 17:31:05 +01:00
Tim Edwards bc00b5578b Implemented a new configuration variable "dist_prefix" for
distributed installations, where the immediate installation location
is different from the final installation location, but in the case
where it is not desirable to put the entire install hierarchy as a
subdirectory of DESTDIR.
2020-01-28 10:40:01 -05:00
Tim Edwards 82e33248f2 Corrected dereferencing of cell dependencies, which was being applied
only at the time of running the command "load".  But cells are generally
loaded only on an as-needed basis, so the dereferencing option must be
saved as a flag in the cell and honored whenever its subcells are expanded
or otherwise read at a later time.
2020-01-02 10:13:04 -05:00
Tim Edwards 0eb3b1fe1c Corrected an error in ext2spice related to the recent modification to get
rid of redundant port entries in subcircuits.  There is still an outstanding
issue as to whether nodes and connections need to be recursively iterated
to the hierarchy bottom.  The current fix corrected the test case.  Also,
added a "-dereference" option to the "load" command to revert to the
original behavior of using only search paths from "addpath" when searching
for files to load.
2019-11-14 15:18:26 -05:00
Tim Edwards c31b305848 Corrected the dependency list in the Makefile for "modules", which
should depend on database/database.h;  otherwise running distributed
make can start compiling modules before the database.h file is
created.
2019-07-14 12:07:38 -04:00
Tim Edwards 1f3a512909 Added a "plot svg" command that, when used in conjuction with the
Cairo graphics package (magic -d XR), will map the display onto
an SVG surface and save it to a file using the Cairo SVG backend.
Due to the simplicity of the mapping, there are no options to this
plot command;  it just creates a file that is a (scalable!)
replica of the layout window.
2019-03-12 13:29:24 -04:00
Tim Edwards bb0af34441 Corrected an obscure error that causes the background of the layout
window to change after hiding a layer using the toolbar and then
refreshing the layout.  Fixed by saving and restoring the graphics
state around the routine that configures the toolbar image.  Also
added a check to CifPaintCurrent to guard against using an unassigned
ClientData record as a pointer (causes a crash), and added braces
around "expr" values in the Tcl wrapper, which reportedly results in
faster execution of the expression.
2018-10-23 08:44:04 -04:00
Tim Edwards 54e6171e9c Corrected an error that prevents the compile option
"--enable-cairo-offscreen" from working.  Because the option
does not run the full Cario initialization, the grTCairoVisualInfo
is not set, and the first attempt to create a Cairo surface
fails with a segfault.
2018-09-13 10:19:48 -04:00
Tim Edwards cfccdb84c1 Rewrote the configuration scripts, makefiles, and some initialization
routines to use the Tcl and Tk stubs libraries.
2017-10-13 10:28:07 -04:00
Tim Edwards 9c22e2e059 Corrected duplicate global variable grVisualInfo between grTOGL1.c
and grTCairo1.c.
2017-10-12 10:42:13 -04:00
Tim Edwards b5dd3304ee Additional small correction. 2017-10-04 21:57:54 -04:00
Tim Edwards 7ed43ba964 Removed the call to glFinish() because it appears mostly to
cause synchronization delays.
2017-10-04 15:40:11 -04:00
Tim Edwards 00556d2999 Removed two temporary backup files. 2017-10-04 14:58:07 -04:00
Tim Edwards 93bcfeb093 Finally worked out how to correctly use the OpenGL general-purpose
frame buffers and render buffers, and use fast frame buffer bit
block transfers to do copies to and from backing store.  Also found
a long-standing problem where multiple windows fail to refresh
properly in OpenGL and Cairo interfaces due to a lack of calling
GrLock() and GrUnlock() around the call to fetch backing store
after an expose event.  The use of the general purpose frame
buffer allows magic to avoid calling any indirect rendering methods
and should now (finally) allow magic to run in OpenGL mode over a
VNC.  Use of direct rendering methods only also means that magic
does not need to be compiled with the ad hoc switch to have Cairo
handle drawing into pixmaps for the icons (this remains to be
tested).
2017-10-04 14:53:01 -04:00
Tim Edwards 6455c07d0f Corrected pattern drawing on polygons. 2017-09-27 17:43:52 -04:00
Tim Edwards 18ebf84ad8 One more attempt at correcting off-screen rendering. Noting that
Cairo works perfectly for the off-screen rendering and that OpenGL
works perfectly for the on-screen rendering, make a compile-time
option to use both in their respective areas of perfection.
2017-09-17 12:31:31 -04:00
Tim Edwards c3132298ba Changed CONST86 back to CONST84 to maintain compatibility with
Tcl/Tk 8.5, although this should probably be in an ifdef or
something.
2017-09-17 11:31:07 -04:00
Tim Edwards 90826eec70 Attempt to work around problems with the OpenGL off-screen rendering
by using a Pbuffer instead of a GLXPixmap, which is too often not
supported for direct rendering.  The only way I found to make this
work was to do a (very) slow pixel-by-pixel copy from the Pbuffer
into the pixmap.  However, this only needs to be done once for each
toolbar icon, and the icons are small, so it is not really a problem.
2017-09-17 11:20:18 -04:00
Tim Edwards 0fd9f890c5 Corrected error attempting to free the backing store memory twice
during a window close event (Cairo graphics interface only).
2017-09-16 15:40:18 -04:00
Tim Edwards 3108e5f18c Found that the crosshair function was wasting compute cycles by
drawing out-of-bounds when the crosshair was turned off rather
than just not drawing it.
2017-09-15 22:20:00 -04:00
Tim Edwards 074553a1e4 Corrected backing store put/get in the case of obscuring windows.
The OpenGL version was disabling backing store while any window
obscures the layout;  the Cairo version was not.
2017-09-15 21:12:44 -04:00
Tim Edwards f754270e0a Corrected problem with passing the MagWindow to the backing store
routine;  failure to use the passed MagWindow value caused crashes
when using more than one window in the Cairo graphics interface.
2017-09-15 20:47:44 -04:00
Tim Edwards b1770396e5 Corrected text clipping to cell bounds, and adjusted screen to
a half-pixel offset that centers coordinates on pixels, so single-
pixel objects like cell boundaries or the crosshair will be drawn
a single pixel in width.
2017-09-15 16:51:13 -04:00
Tim Edwards f12d98c2c7 Applied an upside-down scale transformation to the pattern matrix,
otherwise patterns end up upside-down relative to other graphics
interfaces.
2017-09-15 14:55:41 -04:00
Tim Edwards 536e198ee8 Corrected typo in call to cairo_surface_destroy, incorrectly
written cairo_destroy_surface (fails to run with Tcl <= 8.5,
runs with Tcl 8.6 and "load -lazy" but then creates a
potential crash condition).
2017-09-15 11:22:52 -04:00
Tim Edwards 35c3510ea7 Finished the implementation of Cairo 2D graphics (yay!).
Specifically, fixed the initial background, display of text,
reinstated supercolor values, and fixed the backing store
coordinates.
2017-09-14 17:03:53 -04:00
Tim Edwards 1d3bb0d698 Corrected problems having to do with color (blue and green were swapped)
and incorrect call to cairo_set_source_rgba which is in an unused
function and has no effect except with versions of Tcl less than 8.6
where "load -lazy" is not available and unknown functions cause
immediate exit.  Cleaned up remaining references to OpenGL in the
Cairo code, and updated the copyright and acknowledged Chuan Chen, who
coded the Cairo interface.  No attempt yet to deal with memory leaks
caused by calling Cairo "create" functions without the accompanying
"destroy" functions.
2017-09-12 15:42:08 -04:00
Chuan Chen 29335ca0b0 Remote changes at Mon Sep 4 23:35:07 EDT 2017 by chuan on vivaldi 2017-09-04 23:35:07 -04:00
Chuan Chen 683892981c Remote changes at Mon Sep 4 23:20:22 EDT 2017 by chuan on vivaldi 2017-09-04 23:20:22 -04:00
Tim Edwards 37e7b7ffeb Changed the offscreen-rendering handling in SetProjection to be
more like the Tk/X11 model than the OpenGL model, since Cairo
isn't picky about pixmaps.
2017-09-01 09:12:02 -04:00
Chuan Chen 2aff81a748 Remote changes at Fri Sep 1 00:39:19 EDT 2017 by chuan on vivaldi 2017-09-01 00:39:19 -04:00
Chuan Chen b397adadef Remote changes at Thu Aug 31 23:54:11 EDT 2017 by chuan on vivaldi 2017-08-31 23:54:11 -04:00
Chuan Chen bf471d26ef Remote changes at Thu Aug 31 14:11:17 EDT 2017 by chuan on vivaldi 2017-08-31 14:11:17 -04:00
Chuan Chen a40c1f21a7 Remote changes at Wed Aug 30 16:34:42 EDT 2017 by chuan on vivaldi 2017-08-30 16:34:42 -04:00
Chuan Chen 2cf9f82447 Remote changes at Tue Aug 29 12:52:57 EDT 2017 by chuan on vivaldi 2017-08-29 12:52:57 -04:00
Chuan Chen 77da51d416 Remote changes at Thu Aug 24 17:24:48 EDT 2017 by chuan on vivaldi 2017-08-24 17:24:48 -04:00
Chuan Chen 87a88be5d6 Remote changes at Fri Aug 18 14:42:55 EDT 2017 by chuan on vivaldi 2017-08-18 14:42:55 -04:00
Chuan Chen 902ae0c7d4 Remote changes at Fri Aug 18 14:15:12 EDT 2017 by chuan on vivaldi 2017-08-18 14:15:12 -04:00
Chuan Chen 17e387bfa2 Remote changes at Thu Aug 17 15:42:31 EDT 2017 by chuan on vivaldi 2017-08-17 15:42:31 -04:00
Chuan Chen cb55befc20 Remote changes at Thu Aug 17 13:47:38 EDT 2017 by chuan on vivaldi 2017-08-17 13:47:38 -04:00
Chuan Chen 1ad0d77537 Remote changes at Wed Aug 16 14:11:12 EDT 2017 by chuan on vivaldi 2017-08-16 14:11:12 -04:00