ef1646a60302c5f8d670259010f7b155dc7a8f89
[occt.git] / src / OpenGl / OpenGl_GraphicDriver_print.cxx
1 // File         OpenGl_GraphicDriver_print.c
2 // Created      March 2000
3 // Author       THA
4 // e-mail       t-hartl@muenchen.matra-dtv.fr
5
6 /************************************************************************/
7 /* Includes                                                             */
8 /************************************************************************/
9
10 #include <OpenGl_GraphicDriver.jxx>
11 #include <Aspect_DriverDefinitionError.hxx>
12 #include <Standard_NotImplemented.hxx>
13
14 #include <OpenGl_tgl_funcs.hxx>
15
16
17 /************************************************************************/
18 /* Print Methods                                                        */
19 /************************************************************************/
20
21 Standard_Boolean OpenGl_GraphicDriver::Print
22   (const Graphic3d_CView& ACView, 
23    const Aspect_CLayer2d& ACUnderLayer, 
24    const Aspect_CLayer2d& ACOverLayer,
25    const Aspect_Handle    hPrintDC,
26    const Standard_Boolean showBackground,
27    const Standard_CString filename,
28    const Aspect_PrintAlgo printAlgorithm,
29    const Standard_Real theScaleFactor) const
30 {
31
32 #ifdef WNT
33   Graphic3d_CView MyCView = ACView;
34   Aspect_CLayer2d MyCUnderLayer = ACUnderLayer;
35   Aspect_CLayer2d MyCOverLayer = ACOverLayer;
36
37   if (MyTraceLevel) {
38     PrintFunction ("call_togl_print");
39     PrintCView (MyCView, 1);
40   }
41   return call_togl_print (&MyCView, &MyCUnderLayer, &MyCOverLayer,
42                           hPrintDC, (int)showBackground, filename,
43                           (int)printAlgorithm, (float)theScaleFactor);
44 #else
45   Standard_NotImplemented::Raise ("OpenGl_GraphicDriver::Print is implemented "
46     "only on Windows");
47   return Standard_False;
48 #endif
49 }