MantisBT - ParaView
View Issue Details
0013950ParaView(No Category)public2013-03-20 10:272013-05-22 18:17
David C. Lonie 
David C. Lonie 
normalminorhave not tried
closedfixed 
git-master 
 
TBD
13950-gl2ps-size-factors
incorrect functionality
0013950: Scale line/point size in GL2PS export
Allow the GL2PS export feature to scale the line width and point size. This functionality was removed during the GL2PS rewrite, and should be restored and exposed in the GUI.
No tags attached.
Issue History
2013-03-20 10:27David C. LonieNew Issue
2013-03-20 10:27David C. LonieAssigned To => David C. Lonie
2013-03-25 15:49David C. LonieTopic Name => 13950-gl2ps-size-factors
2013-03-25 15:49David C. LonieNote Added: 0030477
2013-03-25 15:49David C. LonieStatusbacklog => gatekeeper review
2013-03-25 15:49David C. LonieResolutionopen => fixed
2013-03-29 13:09Sebastien JourdainStatusgatekeeper review => customer review
2013-04-02 18:47Alan ScottNote Added: 0030494
2013-04-03 08:21David C. LonieNote Added: 0030506
2013-04-30 21:17Alan ScottNote Added: 0030662
2013-05-01 09:07David C. LonieNote Added: 0030663
2013-05-22 18:17Alan ScottNote Added: 0030824
2013-05-22 18:17Alan ScottStatuscustomer review => closed

Notes
(0030477)
David C. Lonie   
2013-03-25 15:49   
Readded functionality:

    Restore ability to scale gl2ps linewidth/pointsize.
    
    The functions:
    
    static void vtkGL2PSExporter::SetGlobalLineWidthFactor(float);
    static void vtkGL2PSExporter::SetGlobalPointSizeFactor(float);
    
    were removed during the GL2PS rewrite. This patch restores the
    functionality by adding LineWidthFactor and PointSizeFactor ivars to
    vtkGL2PSExporter and the associated setters:
    
    void vtkGL2PSExporter::SetLineWidthFactor(float)
    void vtkGL2PSExporter::SetPointSizeFactor(float)
    
    These attributes are specific to the vtkGL2PSExporter instances, while
    the old implementation stored them in global variables.
    
    A vtkOpenGLGL2PSHelper is added to RenderingOpenGL that fakes the
    GL2PS function calls needed to update line width, point size, and
    stipple state. The public static methods are called from the rendering
    code when the GL state is changed to inform GL2PS of the change. The
    vtkOpenGLGL2PSHelper class is used to update GL2PS without introducing
    a dependency on vtkgl2ps to vtkRenderingOpenGL.
    
    The TestContextGL2PS unit test is modified to ensure that 1.0 scaling
    factors are used.
    
    The vtkGL2PSContextDevice::StippleOn was not used, and is removed in
    this commit.
    
    Change-Id: Ia367211848f69ffdb093fceeb9baa029435a20d0
(0030494)
Alan Scott   
2013-04-02 18:47   
David,
Is this bug fix testable? How do you do it? Thanks - Alan
(0030506)
David C. Lonie   
2013-04-03 08:21   
In can be tested in the ParaView GUI by going to

File >> Export Scene

and exporting a PDF/SVG/PS/EPS file. The export dialog that shows up has two new options, one for line width scaling and another for point size scaling. Changing these should affect the exported image.

Dave
(0030662)
Alan Scott   
2013-04-30 21:17   
Dave,
I tried what you suggested, and did not see any changes whatsoever with regards to line width. I did as follows:

Linux, Master, remote server.
can.exo. Apply. Wireframe.
Export Scene. Choose name, and .pdf. Change line width to 10 (and also to 0 in another output).

What am I doing wrong?
(0030663)
David C. Lonie   
2013-05-01 09:07   
Hi Alan,

I forgot to mention -- disable the "rasterize 3D geometry" option to see the effect. Otherwise it embeds the raw pixel data, rather than exporting the lines as vectors.

Dave
(0030824)
Alan Scott   
2013-05-22 18:17   
Tested remote server, master, Linux.