[vtkusers] Rasterized output with vtkGL2PSExporter

Dan Lipsa dan.lipsa at kitware.com
Thu Jun 14 11:39:02 EDT 2018


Roman,
For the new OpenGL2 backend only 2D polygon data drawn within a
vtkContext2D can be exported as vector data in a PDF or SVG. This is
because GL2PS uses a feature removed from recent OpenGL versions
(glFeedbackBuffer). So, if exporting vector data is important to your
application you'll have to port it to draw everything inside a vtkContext2D
class. We are currently doing this port for the cdat.


On Thu, Jun 14, 2018 at 11:16 AM Roman Hiestand <roman.hiestand at fluxim.com>
wrote:

> Hello
>
> Since upgrading to VTK 8.1.1 and using the OpenGL2 backend I have noticed
> that when exporting to vector graphics formats such as PDF and SVG using
> vtkGL2PSExporter a large part of the scene is rasterized.
> I have a 2D scene with a vtkPolyDataMapper and some axis
> (vtkCubeAxesActor2D), the camera is set to parallel projection.
> When I try to export the scene to PDF or SVG using vtkGL2PSExporter the
> vtkPolyData is rasterized, while the axis (including labels etc) is
> exported in vector graphics.
>
> I tried fiddling around with the parameters of vtkGL2PSExporter, but I
> wasn't able to achieve all-vector-graphics like with VTK 8.0 and (old)
> OpenGL backend.
>
> Has anyone a clue how to create a non-rasterized output? When debugging
> the code, I saw that vtkGL2PSExporter rasterizes the background, but why is
> the vtkPolyDataMapper considered to be background?
>
> I also tried exporting the same vtkPolyData with ParaView (5.5.1 64bit
> Windows) to PDF or SVG, and I have the same effect there, the polydata is
> rasterized.
>
> Regards
> Roman
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180614/a2dc61c8/attachment.html>


More information about the vtkusers mailing list