0024530: TKMesh - remove unused package IntPoly
[occt.git] / src / Vrml / Vrml_FontStyle.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
973c2be1 5// This library is free software; you can redistribute it and / or modify it
6// under the terms of the GNU Lesser General Public version 2.1 as published
7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
7fd59977 14#include <Vrml_FontStyle.ixx>
15
16Vrml_FontStyle::Vrml_FontStyle(const Standard_Real aSize,
17 const Vrml_FontStyleFamily aFamily,
18 const Vrml_FontStyleStyle aStyle)
19{
20 mySize = aSize;
21 myFamily = aFamily;
22 myStyle = aStyle;
23}
24
25 void Vrml_FontStyle::SetSize(const Standard_Real aSize)
26{
27 mySize = aSize;
28}
29
30 Standard_Real Vrml_FontStyle::Size() const
31{
32 return mySize;
33}
34
35 void Vrml_FontStyle::SetFamily(const Vrml_FontStyleFamily aFamily)
36{
37 myFamily = aFamily;
38}
39
40 Vrml_FontStyleFamily Vrml_FontStyle::Family() const
41{
42 return myFamily;
43}
44
45 void Vrml_FontStyle::SetStyle(const Vrml_FontStyleStyle aStyle)
46{
47 myStyle = aStyle;
48}
49
50 Vrml_FontStyleStyle Vrml_FontStyle::Style() const
51{
52 return myStyle;
53}
54
55 Standard_OStream& Vrml_FontStyle::Print(Standard_OStream& anOStream) const
56{
57 anOStream << "FontStyle {" << endl;
58
59 if ( Abs(mySize - 10) > 0.0001 )
60 {
61 anOStream << " size" << '\t';
62 anOStream << mySize << endl;
63 }
64
65 switch ( myFamily )
66 {
67 case Vrml_SERIF: break; // anOStream << " family" << "\tSERIF ";
68 case Vrml_SANS: anOStream << " family" << "\tSANS" << endl; break;
69 case Vrml_TYPEWRITER: anOStream << " family" << "\tTYPEWRITER" << endl; break;
70 }
71
72 switch ( myStyle )
73 {
74 case Vrml_NONE: break; // anOStream << " style" << "\tSERIF ";
75 case Vrml_BOLD: anOStream << " style" << "\tBOLD" << endl; break;
76 case Vrml_ITALIC: anOStream << " style" << "\tITALIC" << endl; break;
77 }
78
79 anOStream << '}' << endl;
80 return anOStream;
81
82}