(0012808)
|
Sven Buijssen
|
2008-07-23 08:22
|
|
On 10/Aug/2007 04:13pm I posted a patch on the paraview mailing list that adds the possibility to export screenshots as vector graphics in the file formats PS, EPS and SVG using the library GL2PS (as opposed to vtkPostScriptWriter which exports bitmap postscript).
The relevant VTK data structures have changed a least three times since, so I needed to update the patch a couple of times. Applying the attached patch to top of CVS trunk adds the feature the reporter asked for two years ago. According to feedback I received in response to my patch posting (feedback on the mailing list, but mainly via private mails) there are at least a few other groups besides mine and the reporter's one that are highly interested in this additional export filter.
It would be great if it could find its way into CVS trunk.
Shortcomings of the patch:
(1) The macro
SET(VTK_USE_GL2PS_ISSET ON)
- set in the patched file ParaViewCommon.cmake - is not propagated to Qt/Core/pqRenderViewBase.cxx. As I'm not familiar with CMake syntax, I hardcoded the preprocessor macro VTK_USE_GL2PS there. For someone familiar with CMake, it probably takes only a few minutes to set up things correctly.
(2) Errors thrown by GL2PS are not catched.
(3) GL2PS seems to be incapable to handle objects with the "Interpolate Colors" display property. Those objects are exported with white colors. The patch does not automagically disable this property before export (and restore it afterwards). So far, a user needs to untick this property before export where appropriate in the Object Inspector.
Apparent shortcomings of GL2PS this patch does not compensate for:
(1) GL2PS seems to be incapable to handle TextSource objects. Instead of the text itself, a white-colored outline box of the text is rendered.
(2) Attempts to export a Mandelbrot Source result in a segmentation fault. |
|