Commit Graph

52 Commits

Author SHA1 Message Date
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
Chuan Chen cebebcccc8 Remote changes at Wed Aug 16 13:52:31 EDT 2017 by chuan on vivaldi 2017-08-16 13:52:31 -04:00
Chuan Chen 72f9a2a1ab Remote changes at Tue Aug 15 15:19:13 EDT 2017 by chuan on vivaldi 2017-08-15 15:19:13 -04:00
Chuan Chen ad6cbe2e2f Remote changes at Fri Aug 11 15:42:32 EDT 2017 by chuan on vivaldi 2017-08-11 15:42:32 -04:00
Chuan Chen 9e183c63f4 Remote changes at Fri Aug 11 15:18:32 EDT 2017 by chuan on vivaldi 2017-08-11 15:18:32 -04:00
Chuan Chen 2fd19426d9 Remote changes at Thu Aug 10 14:28:06 EDT 2017 by chuan on vivaldi 2017-08-10 14:28:06 -04:00
Chuan Chen 0da80741da Remote changes at Thu Aug 10 14:27:50 EDT 2017 by chuan on vivaldi 2017-08-10 14:27:50 -04:00
Chuan Chen 6e8274ab5c Remote changes at Wed Aug 9 14:55:30 EDT 2017 by chuan on vivaldi 2017-08-09 14:55:30 -04:00
Chuan Chen 660d41a69b Remote changes at Tue Aug 8 15:00:19 EDT 2017 by chuan on vivaldi 2017-08-08 15:00:19 -04:00
Chuan Chen d905f10595 Remote changes at Mon Aug 7 16:22:11 EDT 2017 by chuan on vivaldi 2017-08-07 16:22:11 -04:00
Chuan Chen a90545be3f Remote changes at Mon Aug 7 15:37:14 EDT 2017 by chuan on vivaldi 2017-08-07 15:37:14 -04:00
Chuan Chen 31ac164be4 Remote changes at Mon Aug 7 14:38:50 EDT 2017 by chuan on vivaldi 2017-08-07 14:38:50 -04:00
Chuan Chen 9bd159f1c8 Remote changes at Mon Aug 7 14:17:12 EDT 2017 by chuan on vivaldi 2017-08-07 14:17:12 -04:00
Chuan Chen d92f400a8b Remote changes at Fri Aug 4 16:43:56 EDT 2017 by chuan on vivaldi 2017-08-04 16:43:56 -04:00