00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef SO_TO_PDF_ACTION_H
00026 #define SO_TO_PDF_ACTION_H
00027
00028 #include <HardCopy/SoToU3DAction.h>
00029
00030 #include <Inventor/SbColor.h>
00031 #include <Inventor/actions/SoSubAction.h>
00032 #include <HardCopy/SoHardCopy.h>
00033
00034 class SoToPDFActionPrivate;
00035
00132 class SoToPDFAction : public SoToU3DAction
00133 {
00134 SO_ACTION_HEADER(SoToPDFAction);
00135
00136 public:
00137
00138
00139
00140
00141 SoToPDFAction();
00142
00143
00144
00145
00146 virtual ~SoToPDFAction();
00147
00153 SoNONUNICODE virtual bool openFile(const char* filename);
00154
00158 virtual bool openFile( const SbString& filename );
00159
00163 virtual bool closeFile();
00164
00174 SoNONUNICODE void setPassword(const char* writePass, const char* readPass = NULL);
00175
00183 void setPassword( const SbString& writePass, const SbString& readPass = "" );
00184
00191 SoNONUNICODE void setTitle(const char* title);
00192
00197 void setTitle(const SbString& title);
00198
00205 SoNONUNICODE void setText(const char* text);
00206
00211 void setText(const SbString& text);
00212
00217 void setLandscape( const SbBool enable );
00218
00219 private:
00223 static void initClass();
00224 static void exitClass();
00225
00226 static bool writeFile(
00227 const SbString& pdfOutput,
00228 const SbString& writePass,
00229 const SbString& readPass,
00230 const SbString& title,
00231 const SbString& text,
00232 const SbString& u3dInput,
00233 const SbString& u3dView,
00234 bool hasPerspective,
00235 float fov,
00236 float focalDistance,
00237 bool hasLights,
00238 const SbColor& background,
00239 bool landscape = false);
00240
00241 private:
00242
00243 SoToPDFActionPrivate* m_private;
00244 };
00245
00246 #endif // SO_TO_PDF_ACTION_H
00247
00248
00249