0023510: Integration of test grid "vis" into the new testing system
[occt.git] / src / Prs2d / Prs2d_AspectHidingText.cxx
1 // Copyright (c) 1999-2012 OPEN CASCADE SAS
2 //
3 // The content of this file is subject to the Open CASCADE Technology Public
4 // License Version 6.5 (the "License"). You may not use the content of this file
5 // except in compliance with the License. Please obtain a copy of the License
6 // at http://www.opencascade.org and read it completely before using this file.
7 //
8 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
10 //
11 // The Original Code and all software distributed under the License is
12 // distributed on an "AS IS" basis, without warranty of any kind, and the
13 // Initial Developer hereby disclaims all such warranties, including without
14 // limitation, any warranties of merchantability, fitness for a particular
15 // purpose or non-infringement. Please see the License for the specific terms
16 // and conditions governing the rights and limitations under the License.
17
18 #include <Prs2d_AspectHidingText.ixx>
19
20 Prs2d_AspectHidingText::Prs2d_AspectHidingText
21                             ( const Quantity_NameOfColor ColorInd, 
22                                               const Quantity_NameOfColor HidingColorInd, 
23                                   const Quantity_NameOfColor FrameColorInd, 
24                                   const Aspect_WidthOfLine   FrameWidthInd,
25                                   const Aspect_TypeOfFont    FontInd,
26                                   const Standard_ShortReal   aSlantInd,
27                                   const Standard_ShortReal   aHScaleInd,
28                                   const Standard_ShortReal   aWScaleInd,
29                                   const Standard_Boolean     isUnderlined ): 
30     Prs2d_AspectRoot( Prs2d_AN_HIDINGTEXT ),
31     myFontInd( FontInd ),
32     myColorInd( ColorInd ),
33     HidingColorInd( HidingColorInd ),
34     FrameColorInd( FrameColorInd ),
35     FrameWidthInd( FrameWidthInd ),
36     mySlantInd( aSlantInd ),
37     myHScaleInd( aHScaleInd ),
38     myWScaleInd( aWScaleInd ),
39     myIsUnderlined( isUnderlined )
40 {
41 }
42
43  void Prs2d_AspectHidingText::SetColorOfText(const Quantity_NameOfColor aColorInd) {
44
45          myColorInd = aColorInd;
46  }
47
48  void Prs2d_AspectHidingText::SetFontOfText(const Aspect_TypeOfFont aFontInd) {
49     
50          myFontInd = aFontInd;
51  }
52
53  void Prs2d_AspectHidingText::SetSlant(const Standard_ShortReal aSlantInd) {
54
55          mySlantInd = aSlantInd;
56  }
57
58  void Prs2d_AspectHidingText::SetHScale(const Standard_ShortReal aHScaleInd) {
59  
60          myHScaleInd = aHScaleInd;
61  }
62
63  void Prs2d_AspectHidingText::SetWScale(const Standard_ShortReal aWScaleInd) {
64
65          myWScaleInd = aWScaleInd;
66  }
67
68  void Prs2d_AspectHidingText::SetUnderlined(const Standard_Boolean anIsUnderline) {
69
70          myIsUnderlined = anIsUnderline;
71  }
72
73  void Prs2d_AspectHidingText::SetHidingColorOfText(const Quantity_NameOfColor aHidColorInd) {
74
75          HidingColorInd = aHidColorInd;
76 }
77
78  void Prs2d_AspectHidingText::SetFrameColorOfText(const Quantity_NameOfColor aFrameColorInd) {
79
80          FrameColorInd =  aFrameColorInd;
81  }
82
83  void Prs2d_AspectHidingText::SetFrameWidthOfText(const Aspect_WidthOfLine aFrameWidthInd) {
84
85          FrameWidthInd = aFrameWidthInd;
86  }
87
88  void Prs2d_AspectHidingText::Values(Quantity_NameOfColor& ColorInd, 
89                                          Quantity_NameOfColor& HidingColorInd,
90                                                                          Quantity_NameOfColor& FrameColorInd,
91                                                                          Aspect_WidthOfLine&   FrameWidthInd,
92                                                                          Aspect_TypeOfFont&    FontInd,
93                                                                          Standard_ShortReal&   aSlantInd,
94                                                                          Standard_ShortReal&   aHScaleInd,
95                                                                          Standard_ShortReal&   aWScaleInd,
96                                                                          Standard_Boolean&     isUnderlined) const{
97     FontInd        = myFontInd;
98     ColorInd       = myColorInd;
99     aSlantInd      = mySlantInd;
100     aHScaleInd     = myHScaleInd;
101     aWScaleInd     = myWScaleInd;
102     isUnderlined   = myIsUnderlined;
103     HidingColorInd = HidingColorInd;
104     FrameColorInd  = FrameColorInd;
105     FrameWidthInd  = FrameWidthInd;
106  }