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.
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>
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.
"--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.
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).
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.
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.
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.