1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <Graphic3d_AspectText3d.hxx>
18 IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Standard_Transient)
20 // =======================================================================
21 // function : Graphic3d_AspectText3d
23 // =======================================================================
24 Graphic3d_AspectText3d::Graphic3d_AspectText3d()
25 : myFont (Font_NOF_ASCII_MONO),
26 myColor (Quantity_NOC_YELLOW),
29 myStyle (Aspect_TOST_NORMAL),
30 myDisplayType (Aspect_TODT_NORMAL),
31 myColorSubTitle (Quantity_NOC_WHITE),
32 myTextZoomable (false),
34 myTextFontAspect(Font_FA_Regular)
39 // =======================================================================
40 // function : Graphic3d_AspectText3d
42 // =======================================================================
43 Graphic3d_AspectText3d::Graphic3d_AspectText3d (const Quantity_Color& theColor,
44 const Standard_CString theFont,
45 const Standard_Real theExpansionFactor,
46 const Standard_Real theSpace,
47 const Aspect_TypeOfStyleText theStyle,
48 const Aspect_TypeOfDisplayText theDisplayType)
51 myFactor (theExpansionFactor),
54 myDisplayType (theDisplayType),
55 myColorSubTitle (Quantity_NOC_WHITE),
56 myTextZoomable (false),
58 myTextFontAspect(Font_FA_Regular)
62 myFont = Font_NOF_ASCII_MONO;
65 if (theExpansionFactor <= 0.0)
67 throw Graphic3d_AspectTextDefinitionError("Bad value for TextScaleFactor");