2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 // e-mail t-hartl@muenchen.matra-dtv.fr
17 /************************************************************************/
19 /************************************************************************/
21 #include <Visual3d_View.jxx>
22 #include <Visual3d_View.pxx>
24 /************************************************************************/
26 /************************************************************************/
28 Standard_Boolean Visual3d_View::Print
29 (const Aspect_Handle hPrintDC,
30 const Standard_Boolean showBackground,
31 const Standard_CString filename,
32 const Aspect_PrintAlgo printAlgorithm,
33 const Standard_Real theScaleFactor) const
35 return Print (MyViewManager->UnderLayer (),
36 MyViewManager->OverLayer (),
37 hPrintDC, showBackground,
38 filename, printAlgorithm,
42 Standard_Boolean Visual3d_View::Print
43 (const Handle(Visual3d_Layer)& AnUnderLayer,
44 const Handle(Visual3d_Layer)& AnOverLayer,
45 const Aspect_Handle hPrintDC,
46 const Standard_Boolean showBackground,
47 const Standard_CString aFilename,
48 const Aspect_PrintAlgo printAlgorithm,
49 const Standard_Real theScaleFactor) const
51 if (IsDeleted ()) return Standard_False;
53 if ((! IsDefined ()) || (! IsActive ())) return Standard_False;
55 if (! MyWindow->IsMapped ()) return Standard_False;
57 Aspect_CLayer2d OverCLayer;
58 Aspect_CLayer2d UnderCLayer;
60 OverCLayer.ptrLayer = UnderCLayer.ptrLayer = NULL;
61 if (! AnOverLayer.IsNull ()) OverCLayer = AnOverLayer->CLayer ();
62 if (! AnUnderLayer.IsNull ()) UnderCLayer = AnUnderLayer->CLayer ();
64 return MyGraphicDriver->Print (MyCView, UnderCLayer, OverCLayer,
65 hPrintDC, showBackground, aFilename,
66 printAlgorithm, theScaleFactor);