summaryrefslogtreecommitdiff
path: root/src/Vrml/Vrml_FontStyle.cxx
blob: 840d3c03210b937ca18f452017076a228f547066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include <Vrml_FontStyle.ixx>

Vrml_FontStyle::Vrml_FontStyle(const Standard_Real aSize,
			       const Vrml_FontStyleFamily aFamily,
			       const Vrml_FontStyleStyle aStyle)
{
  mySize = aSize;
  myFamily = aFamily;
  myStyle = aStyle;
}

 void Vrml_FontStyle::SetSize(const Standard_Real aSize) 
{
  mySize = aSize;
}

 Standard_Real Vrml_FontStyle::Size() const
{
  return mySize;
}

 void Vrml_FontStyle::SetFamily(const Vrml_FontStyleFamily aFamily) 
{
  myFamily = aFamily;
}

 Vrml_FontStyleFamily Vrml_FontStyle::Family() const
{
  return myFamily;
}

 void Vrml_FontStyle::SetStyle(const Vrml_FontStyleStyle aStyle) 
{
  myStyle = aStyle;
}

 Vrml_FontStyleStyle Vrml_FontStyle::Style() const
{
  return myStyle;
}

 Standard_OStream& Vrml_FontStyle::Print(Standard_OStream& anOStream) const
{
 anOStream  << "FontStyle {" << endl;

 if ( Abs(mySize - 10) > 0.0001 )
   {
    anOStream  << "    size" << '\t';
    anOStream <<  mySize  << endl;
   }

  switch ( myFamily )
    {
     case Vrml_SERIF:      break; // anOStream  << "    family" << "\tSERIF ";
     case Vrml_SANS:       anOStream  << "    family" << "\tSANS" << endl; break;
     case Vrml_TYPEWRITER: anOStream  << "    family" << "\tTYPEWRITER" << endl; break; 
    }

  switch ( myStyle )
    {
     case Vrml_NONE:   break; // anOStream  << "    style" << "\tSERIF ";
     case Vrml_BOLD:   anOStream  << "    style" << "\tBOLD" << endl; break;
     case Vrml_ITALIC: anOStream  << "    style" << "\tITALIC" << endl; break; 
    }

 anOStream  << '}' << endl;
 return anOStream;

}