<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>VTK: dox/Rendering/vtkGL2PSExporter.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.6 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <h1>dox/Rendering/vtkGL2PSExporter.h</h1><a href="a03405.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span> <a name="l00002"></a>00002 <span class="comment"></span> <a name="l00003"></a>00003 <span class="comment"> Program: Visualization Toolkit</span> <a name="l00004"></a>00004 <span class="comment"> Module: $RCSfile: vtkGL2PSExporter.h,v $</span> <a name="l00005"></a>00005 <span class="comment"></span> <a name="l00006"></a>00006 <span class="comment"> Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span> <a name="l00007"></a>00007 <span class="comment"> All rights reserved.</span> <a name="l00008"></a>00008 <span class="comment"> See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span> <a name="l00009"></a>00009 <span class="comment"></span> <a name="l00010"></a>00010 <span class="comment"> This software is distributed WITHOUT ANY WARRANTY; without even</span> <a name="l00011"></a>00011 <span class="comment"> the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span> <a name="l00012"></a>00012 <span class="comment"> PURPOSE. See the above copyright notice for more information.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span> <a name="l00085"></a>00085 <span class="preprocessor">#ifndef __vtkGL2PSExporter_h</span> <a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define __vtkGL2PSExporter_h</span> <a name="l00087"></a>00087 <span class="preprocessor"></span> <a name="l00088"></a>00088 <span class="preprocessor">#include "<a class="code" href="a03397.html">vtkExporter.h</a>"</span> <a name="l00089"></a>00089 <a name="l00090"></a><a class="code" href="a00642.html">00090</a> <span class="keyword">class </span><a class="code" href="a02170.html#4019f67b2e7d601f2cf984e448308dbb">VTK_RENDERING_EXPORT</a> <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a> : <span class="keyword">public</span> <a class="code" href="a00494.html" title="abstract class to write a scene to a file">vtkExporter</a> <a name="l00091"></a>00091 { <a name="l00092"></a>00092 <span class="keyword">public</span>: <a name="l00093"></a>00093 <span class="keyword">static</span> <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a> *<a class="code" href="a01084.html#4d5b227267c076d6f9e38483370b6612">New</a>(); <a name="l00094"></a><a class="code" href="a00642.html#78cc1fc480c9fcce12969e2b11ffb1f9">00094</a> vtkTypeRevisionMacro(<a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>,<a class="code" href="a00494.html" title="abstract class to write a scene to a file">vtkExporter</a>); <a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="a00494.html#6642c99a0b13d525bae79db800f188b0">PrintSelf</a>(ostream& os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent); <a name="l00096"></a>00096 <a name="l00098"></a>00098 <a name="l00101"></a>00101 vtkSetStringMacro(FilePrefix); <a name="l00102"></a>00102 vtkGetStringMacro(FilePrefix); <a name="l00104"></a>00104 <a name="l00105"></a>00105 <span class="comment">//BTX</span> <a name="l00106"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f">00106</a> <span class="keyword">enum</span> <a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f">OutputFormat</a> <a name="l00107"></a>00107 { <a name="l00108"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42fd55e71f5ae96a7d7a27a5ce765b8d265">00108</a> PS_FILE, <a name="l00109"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42ff093111c31648487039f086363c0c50a">00109</a> EPS_FILE, <a name="l00110"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f08b4164c38ecc43d1b55748e7b14e2f1">00110</a> PDF_FILE, <a name="l00111"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f65e6b34bb16839629ced0e39a1cdba0e">00111</a> TEX_FILE, <a name="l00112"></a><a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f1d6f15f09d9e62a38b0b58bd8a74c36c">00112</a> SVG_FILE <a name="l00113"></a>00113 }; <a name="l00114"></a>00114 <span class="comment">//ETX</span> <a name="l00115"></a>00115 <a name="l00117"></a>00117 <a name="l00121"></a>00121 vtkSetClampMacro(FileFormat, <span class="keywordtype">int</span>, PS_FILE, SVG_FILE); <a name="l00122"></a>00122 vtkGetMacro(FileFormat, <span class="keywordtype">int</span>); <a name="l00123"></a><a class="code" href="a00642.html#2930d27c1c831ecf3b085f587ce397fc">00123</a> <span class="keywordtype">void</span> SetFileFormatToPS() <a name="l00124"></a>00124 {this->SetFileFormat(PS_FILE);}; <a name="l00125"></a><a class="code" href="a00642.html#f358820e400dc77874441faf01f878fa">00125</a> <span class="keywordtype">void</span> SetFileFormatToEPS() <a name="l00126"></a>00126 {this->SetFileFormat(EPS_FILE);}; <a name="l00127"></a><a class="code" href="a00642.html#cdd9bb7a8ead7fd348309d59bb1ff6e5">00127</a> <span class="keywordtype">void</span> SetFileFormatToPDF() <a name="l00128"></a>00128 {this->SetFileFormat(PDF_FILE);}; <a name="l00129"></a><a class="code" href="a00642.html#6e42e751ba980a502820c40a40b0429c">00129</a> <span class="keywordtype">void</span> SetFileFormatToTeX() <a name="l00130"></a>00130 {this->SetFileFormat(TEX_FILE);}; <a name="l00131"></a><a class="code" href="a00642.html#1fbe908d9657a898fda46d9fa5da3c5d">00131</a> <span class="keywordtype">void</span> SetFileFormatToSVG() <a name="l00132"></a>00132 {this->SetFileFormat(SVG_FILE);}; <a name="l00133"></a>00133 <span class="keyword">const</span> <span class="keywordtype">char</span> *GetFileFormatAsString(); <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="comment">//BTX</span> <a name="l00137"></a><a class="code" href="a00642.html#424ded209043010605b375627acda2e1">00137</a> <span class="keyword">enum</span> <a class="code" href="a00642.html#424ded209043010605b375627acda2e1">SortScheme</a> <a name="l00138"></a>00138 { <a name="l00139"></a><a class="code" href="a00642.html#424ded209043010605b375627acda2e1d0f947fe1cc0c82342de55247f8cde36">00139</a> NO_SORT=0, <a name="l00140"></a><a class="code" href="a00642.html#424ded209043010605b375627acda2e127b37311d06416a7068885e26762e252">00140</a> SIMPLE_SORT=1, <a name="l00141"></a><a class="code" href="a00642.html#424ded209043010605b375627acda2e1a62fab64ed826b741a37b028ce0200ee">00141</a> BSP_SORT=2 <a name="l00142"></a>00142 }; <a name="l00143"></a>00143 <span class="comment">//ETX</span> <a name="l00144"></a>00144 <a name="l00146"></a>00146 <a name="l00149"></a>00149 vtkSetClampMacro(Sort, <span class="keywordtype">int</span>, NO_SORT, BSP_SORT); <a name="l00150"></a>00150 vtkGetMacro(Sort,<span class="keywordtype">int</span>); <a name="l00151"></a><a class="code" href="a00642.html#546bfc1bd5d553258dd3b06bae1f4448">00151</a> <span class="keywordtype">void</span> SetSortToOff() <a name="l00152"></a>00152 {this->SetSort(NO_SORT);}; <a name="l00153"></a><a class="code" href="a00642.html#d0f5c74c2500fdf3c3c94ff3434cafeb">00153</a> <span class="keywordtype">void</span> SetSortToSimple() <a name="l00154"></a>00154 {this->SetSort(SIMPLE_SORT);}; <a name="l00155"></a><a class="code" href="a00642.html#1a99cf86e0420ffbe9a1d4a65ff26cfc">00155</a> <span class="keywordtype">void</span> SetSortToBSP() <a name="l00156"></a>00156 {this->SetSort(BSP_SORT);}; <a name="l00157"></a>00157 <span class="keyword">const</span> <span class="keywordtype">char</span> *GetSortAsString(); <a name="l00159"></a>00159 <a name="l00161"></a>00161 <a name="l00163"></a>00163 vtkSetMacro(Compress, <span class="keywordtype">int</span>); <a name="l00164"></a>00164 vtkGetMacro(Compress, <span class="keywordtype">int</span>); <a name="l00165"></a>00165 vtkBooleanMacro(Compress, <span class="keywordtype">int</span>); <a name="l00167"></a>00167 <a name="l00169"></a>00169 <a name="l00171"></a>00171 vtkSetMacro(DrawBackground, <span class="keywordtype">int</span>); <a name="l00172"></a>00172 vtkGetMacro(DrawBackground, <span class="keywordtype">int</span>); <a name="l00173"></a>00173 vtkBooleanMacro(DrawBackground, <span class="keywordtype">int</span>); <a name="l00175"></a>00175 <a name="l00177"></a>00177 <a name="l00180"></a>00180 vtkSetMacro(SimpleLineOffset, <span class="keywordtype">int</span>); <a name="l00181"></a>00181 vtkGetMacro(SimpleLineOffset, <span class="keywordtype">int</span>); <a name="l00182"></a>00182 vtkBooleanMacro(SimpleLineOffset, <span class="keywordtype">int</span>); <a name="l00184"></a>00184 <a name="l00186"></a>00186 <a name="l00188"></a>00188 vtkSetMacro(Silent, <span class="keywordtype">int</span>); <a name="l00189"></a>00189 vtkGetMacro(Silent, <span class="keywordtype">int</span>); <a name="l00190"></a>00190 vtkBooleanMacro(Silent, <span class="keywordtype">int</span>); <a name="l00192"></a>00192 <a name="l00194"></a>00194 <a name="l00197"></a>00197 vtkSetMacro(BestRoot, <span class="keywordtype">int</span>); <a name="l00198"></a>00198 vtkGetMacro(BestRoot, <span class="keywordtype">int</span>); <a name="l00199"></a>00199 vtkBooleanMacro(BestRoot, <span class="keywordtype">int</span>); <a name="l00201"></a>00201 <a name="l00203"></a>00203 <a name="l00206"></a>00206 vtkSetMacro(<a class="code" href="a03761.html#88ade42854f67d6297898362e17a515f0337776bd9fdfd3d3f740dfbf6503020">Text</a>, <span class="keywordtype">int</span>); <a name="l00207"></a>00207 vtkGetMacro(<a class="code" href="a03761.html#88ade42854f67d6297898362e17a515f0337776bd9fdfd3d3f740dfbf6503020">Text</a>, <span class="keywordtype">int</span>); <a name="l00208"></a>00208 vtkBooleanMacro(<a class="code" href="a03761.html#88ade42854f67d6297898362e17a515f0337776bd9fdfd3d3f740dfbf6503020">Text</a>, <span class="keywordtype">int</span>); <a name="l00210"></a>00210 <a name="l00212"></a>00212 <a name="l00214"></a>00214 vtkSetMacro(Landscape, <span class="keywordtype">int</span>); <a name="l00215"></a>00215 vtkGetMacro(Landscape, <span class="keywordtype">int</span>); <a name="l00216"></a>00216 vtkBooleanMacro(Landscape, <span class="keywordtype">int</span>); <a name="l00218"></a>00218 <a name="l00220"></a>00220 <a name="l00223"></a>00223 vtkSetMacro(PS3Shading, <span class="keywordtype">int</span>); <a name="l00224"></a>00224 vtkGetMacro(PS3Shading, <span class="keywordtype">int</span>); <a name="l00225"></a>00225 vtkBooleanMacro(PS3Shading, <span class="keywordtype">int</span>); <a name="l00227"></a>00227 <a name="l00229"></a>00229 <a name="l00232"></a>00232 vtkSetMacro(OcclusionCull, <span class="keywordtype">int</span>); <a name="l00233"></a>00233 vtkGetMacro(OcclusionCull, <span class="keywordtype">int</span>); <a name="l00234"></a>00234 vtkBooleanMacro(OcclusionCull, <span class="keywordtype">int</span>); <a name="l00236"></a>00236 <a name="l00238"></a>00238 <a name="l00242"></a>00242 vtkSetMacro(Write3DPropsAsRasterImage, <span class="keywordtype">int</span>); <a name="l00243"></a>00243 vtkGetMacro(Write3DPropsAsRasterImage, <span class="keywordtype">int</span>); <a name="l00244"></a>00244 vtkBooleanMacro(Write3DPropsAsRasterImage, <span class="keywordtype">int</span>); <a name="l00246"></a>00246 <a name="l00248"></a>00248 <a name="l00250"></a>00250 <span class="keyword">static</span> <span class="keywordtype">void</span> SetGlobalPointSizeFactor(<span class="keywordtype">float</span> val); <a name="l00251"></a>00251 <span class="keyword">static</span> <span class="keywordtype">float</span> GetGlobalPointSizeFactor(); <a name="l00253"></a>00253 <a name="l00255"></a>00255 <a name="l00257"></a>00257 <span class="keyword">static</span> <span class="keywordtype">void</span> SetGlobalLineWidthFactor(<span class="keywordtype">float</span> val); <a name="l00258"></a>00258 <span class="keyword">static</span> <span class="keywordtype">float</span> GetGlobalLineWidthFactor(); <a name="l00260"></a>00260 <a name="l00261"></a>00261 <span class="keyword">protected</span>: <a name="l00262"></a>00262 <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>(); <a name="l00263"></a>00263 ~<a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>(); <a name="l00264"></a>00264 <a name="l00265"></a>00265 <span class="keywordtype">void</span> <a class="code" href="a00494.html#55f34866b2d869f02f0360fbe1823984">WriteData</a>(); <a name="l00266"></a>00266 <a name="l00267"></a><a class="code" href="a00642.html#32a4decbd998f8f3bea7d19c5e09af98">00267</a> <span class="keywordtype">char</span> *FilePrefix; <a name="l00268"></a><a class="code" href="a00642.html#91c2a98833ec38b0425f856408ff9e6b">00268</a> <span class="keywordtype">int</span> FileFormat; <a name="l00269"></a><a class="code" href="a00642.html#84b58888c27262ccbf49b8388734f413">00269</a> <span class="keywordtype">int</span> Sort; <a name="l00270"></a><a class="code" href="a00642.html#a5411f9ef157c572bfcb28a1ea69d6a4">00270</a> <span class="keywordtype">int</span> Compress; <a name="l00271"></a><a class="code" href="a00642.html#b1762bb1ec11fc1e290caa9f8059ef84">00271</a> <span class="keywordtype">int</span> DrawBackground; <a name="l00272"></a><a class="code" href="a00642.html#a7a577e5021f16128f296f6760f10e4a">00272</a> <span class="keywordtype">int</span> SimpleLineOffset; <a name="l00273"></a><a class="code" href="a00642.html#5beeef5382d41128d2f8dac2483deae8">00273</a> <span class="keywordtype">int</span> Silent; <a name="l00274"></a><a class="code" href="a00642.html#f20fdd4400c102a52e33a9bc5d310e9a">00274</a> <span class="keywordtype">int</span> BestRoot; <a name="l00275"></a><a class="code" href="a00642.html#e1a3b66a0e65d31ecf7d933a7763b3c6">00275</a> <span class="keywordtype">int</span> <a class="code" href="a03761.html#88ade42854f67d6297898362e17a515f0337776bd9fdfd3d3f740dfbf6503020">Text</a>; <a name="l00276"></a><a class="code" href="a00642.html#387971d9d0deb7c6a7edfc0d04a4cdcc">00276</a> <span class="keywordtype">int</span> Landscape; <a name="l00277"></a><a class="code" href="a00642.html#4faf87d1276065b582e1fd9be1a9e5fc">00277</a> <span class="keywordtype">int</span> PS3Shading; <a name="l00278"></a><a class="code" href="a00642.html#c36873623fc2ab901cd59835537ccfb2">00278</a> <span class="keywordtype">int</span> OcclusionCull; <a name="l00279"></a><a class="code" href="a00642.html#7562a9b91776baa6dd55152b064bba4e">00279</a> <span class="keywordtype">int</span> Write3DPropsAsRasterImage; <a name="l00280"></a>00280 <a name="l00281"></a>00281 <span class="keyword">private</span>: <a name="l00282"></a>00282 <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>(<span class="keyword">const</span> <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>&); <span class="comment">// Not implemented</span> <a name="l00283"></a>00283 <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00642.html" title="export a scene as a PostScript file using GL2PS.">vtkGL2PSExporter</a>&); <span class="comment">// Not implemented</span> <a name="l00284"></a>00284 }; <a name="l00285"></a>00285 <a name="l00286"></a><a class="code" href="a00642.html#e3a34d0cf598cebff2d3ae94710100e3">00286</a> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00642.html#e3a34d0cf598cebff2d3ae94710100e3">vtkGL2PSExporter::GetSortAsString</a>(<span class="keywordtype">void</span>) <a name="l00287"></a>00287 { <a name="l00288"></a>00288 <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#84b58888c27262ccbf49b8388734f413">Sort</a> == <a class="code" href="a00642.html#424ded209043010605b375627acda2e1d0f947fe1cc0c82342de55247f8cde36">NO_SORT</a> ) <a name="l00289"></a>00289 { <a name="l00290"></a>00290 <span class="keywordflow">return</span> <span class="stringliteral">"Off"</span>; <a name="l00291"></a>00291 } <a name="l00292"></a>00292 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#84b58888c27262ccbf49b8388734f413">Sort</a> == <a class="code" href="a00642.html#424ded209043010605b375627acda2e127b37311d06416a7068885e26762e252">SIMPLE_SORT</a> ) <a name="l00293"></a>00293 { <a name="l00294"></a>00294 <span class="keywordflow">return</span> <span class="stringliteral">"Simple"</span>; <a name="l00295"></a>00295 } <a name="l00296"></a>00296 <span class="keywordflow">else</span> <a name="l00297"></a>00297 { <a name="l00298"></a>00298 <span class="keywordflow">return</span> <span class="stringliteral">"BSP"</span>; <a name="l00299"></a>00299 } <a name="l00300"></a>00300 } <a name="l00301"></a>00301 <a name="l00302"></a><a class="code" href="a00642.html#970cf26297875d244616a1f93ed1d9ad">00302</a> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00642.html#970cf26297875d244616a1f93ed1d9ad">vtkGL2PSExporter::GetFileFormatAsString</a>(<span class="keywordtype">void</span>) <a name="l00303"></a>00303 { <a name="l00304"></a>00304 <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#91c2a98833ec38b0425f856408ff9e6b">FileFormat</a> == <a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42fd55e71f5ae96a7d7a27a5ce765b8d265">PS_FILE</a> ) <a name="l00305"></a>00305 { <a name="l00306"></a>00306 <span class="keywordflow">return</span> <span class="stringliteral">"PS"</span>; <a name="l00307"></a>00307 } <a name="l00308"></a>00308 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#91c2a98833ec38b0425f856408ff9e6b">FileFormat</a> == <a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42ff093111c31648487039f086363c0c50a">EPS_FILE</a> ) <a name="l00309"></a>00309 { <a name="l00310"></a>00310 <span class="keywordflow">return</span> <span class="stringliteral">"EPS"</span>; <a name="l00311"></a>00311 } <a name="l00312"></a>00312 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#91c2a98833ec38b0425f856408ff9e6b">FileFormat</a> == <a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f08b4164c38ecc43d1b55748e7b14e2f1">PDF_FILE</a> ) <a name="l00313"></a>00313 { <a name="l00314"></a>00314 <span class="keywordflow">return</span> <span class="stringliteral">"PDF"</span>; <a name="l00315"></a>00315 } <a name="l00316"></a>00316 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( this-><a class="code" href="a00642.html#91c2a98833ec38b0425f856408ff9e6b">FileFormat</a> == <a class="code" href="a00642.html#f257a5fd90718c0c46be60f941f4f42f65e6b34bb16839629ced0e39a1cdba0e">TEX_FILE</a> ) <a name="l00317"></a>00317 { <a name="l00318"></a>00318 <span class="keywordflow">return</span> <span class="stringliteral">"TeX"</span>; <a name="l00319"></a>00319 } <a name="l00320"></a>00320 <span class="keywordflow">else</span> <a name="l00321"></a>00321 { <a name="l00322"></a>00322 <span class="keywordflow">return</span> <span class="stringliteral">"SVG"</span>; <a name="l00323"></a>00323 } <a name="l00324"></a>00324 } <a name="l00325"></a>00325 <a name="l00326"></a>00326 <span class="preprocessor">#endif</span> </pre></div></div> <hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:46 2009 for VTK by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> </body> </html>