0027860: Visualization - clean up Transformation Persistence API
[occt.git] / src / Graphic3d / Graphic3d_AspectText3d.cxx
CommitLineData
b311480e 1// Created by: NW,JPB,CAL
2// Copyright (c) 1991-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
42cf5bc1 16#include <Graphic3d_AspectText3d.hxx>
7fd59977 17
b6472664 18IMPLEMENT_STANDARD_RTTIEXT(Graphic3d_AspectText3d, Standard_Transient)
19
20// =======================================================================
21// function : Graphic3d_AspectText3d
22// purpose :
23// =======================================================================
24Graphic3d_AspectText3d::Graphic3d_AspectText3d()
25: myFont (Font_NOF_ASCII_MONO),
26 myColor (Quantity_NOC_YELLOW),
27 myFactor (1.0),
28 mySpace (0.0),
29 myStyle (Aspect_TOST_NORMAL),
30 myDisplayType (Aspect_TODT_NORMAL),
31 myColorSubTitle (Quantity_NOC_WHITE),
32 myTextZoomable (false),
33 myTextAngle (0.0),
34 myTextFontAspect(Font_FA_Regular)
30f0ad28 35{
b6472664 36 //
37}
38
39// =======================================================================
40// function : Graphic3d_AspectText3d
41// purpose :
42// =======================================================================
43Graphic3d_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)
49: myFont (theFont),
50 myColor (theColor),
51 myFactor (theExpansionFactor),
52 mySpace (theSpace),
53 myStyle (theStyle),
54 myDisplayType (theDisplayType),
55 myColorSubTitle (Quantity_NOC_WHITE),
56 myTextZoomable (false),
57 myTextAngle (0.0),
58 myTextFontAspect(Font_FA_Regular)
30f0ad28 59{
b6472664 60 if (myFont.IsEmpty())
61 {
62 myFont = Font_NOF_ASCII_MONO;
63 }
64
65 if (theExpansionFactor <= 0.0)
66 {
67 Graphic3d_AspectTextDefinitionError::Raise ("Bad value for TextScaleFactor");
68 }
30f0ad28 69}