Commit | Line | Data |
---|---|---|
b311480e | 1 | // Created by: THA |
973c2be1 | 2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e | 3 | // |
973c2be1 | 4 | // This file is part of Open CASCADE Technology software library. |
b311480e | 5 | // |
d5f74e42 | 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 | |
973c2be1 | 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. | |
b311480e | 11 | // |
973c2be1 | 12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. | |
b311480e | 14 | |
7fd59977 | 15 | // e-mail t-hartl@muenchen.matra-dtv.fr |
16 | ||
17 | /************************************************************************/ | |
18 | /* Includes */ | |
19 | /************************************************************************/ | |
20 | ||
21 | #include <Visual3d_View.jxx> | |
22 | #include <Visual3d_View.pxx> | |
23 | ||
24 | /************************************************************************/ | |
25 | /* Print Methods */ | |
26 | /************************************************************************/ | |
27 | ||
7edf74fd A |
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 | |
7fd59977 | 34 | { |
7edf74fd A |
35 | return Print (MyViewManager->UnderLayer (), |
36 | MyViewManager->OverLayer (), | |
37 | hPrintDC, showBackground, | |
38 | filename, printAlgorithm, | |
39 | theScaleFactor); | |
7fd59977 | 40 | } |
41 | ||
7edf74fd A |
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 | |
7fd59977 | 50 | { |
7edf74fd | 51 | if (IsDeleted ()) return Standard_False; |
7fd59977 | 52 | |
7edf74fd | 53 | if ((! IsDefined ()) || (! IsActive ())) return Standard_False; |
7fd59977 | 54 | |
7edf74fd | 55 | if (! MyWindow->IsMapped ()) return Standard_False; |
7fd59977 | 56 | |
57 | Aspect_CLayer2d OverCLayer; | |
58 | Aspect_CLayer2d UnderCLayer; | |
59 | ||
60 | OverCLayer.ptrLayer = UnderCLayer.ptrLayer = NULL; | |
61 | if (! AnOverLayer.IsNull ()) OverCLayer = AnOverLayer->CLayer (); | |
62 | if (! AnUnderLayer.IsNull ()) UnderCLayer = AnUnderLayer->CLayer (); | |
63 | ||
7edf74fd A |
64 | return MyGraphicDriver->Print (MyCView, UnderCLayer, OverCLayer, |
65 | hPrintDC, showBackground, aFilename, | |
66 | printAlgorithm, theScaleFactor); | |
7fd59977 | 67 | } |