67808a946356be8c51bb0792bc48631eeee69338
[occt.git] / src / Prs3d / Prs3d_TextAspect.cdl
1 -- File:    Prs3d_TextAspect.cdl
2 -- Created: Tue Sep 14 12:56:09 1993
3 -- Author:  Jean-Louis FRENKEL
4 --      <jlf@stylox>
5 --   GG  : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
6 --                     the restricted NameOfColor.
7 ---Copyright:    Matra Datavision 1993
8
9 class TextAspect from Prs3d inherits BasicAspect from Prs3d
10
11         ---Purpose: Defines the attributes when displaying a text.
12           
13           
14 uses
15     NameOfColor from Quantity, 
16     Color   from Quantity,
17     AspectText3d from Graphic3d,  
18     PlaneAngle from Quantity, 
19     HorizontalTextAlignment  from  Graphic3d, 
20     VerticalTextAlignment  from  Graphic3d, 
21     TextPath from Graphic3d,
22     Length from Quantity
23     
24 is
25     Create returns mutable TextAspect from Prs3d;  
26         --- Purpose: Constructs an empty framework for defining display attributes of text.   
27
28     SetColor(me: mutable; aColor:  Color  from  Quantity);
29  
30     SetColor(me: mutable; aColor:  NameOfColor  from  Quantity);
31         --- Purpose: Sets the color of the type used in text display.
32
33     SetFont(me: mutable; aFont:  CString  from  Standard);
34         --- Purpose: Sets the font used in text display.  
35     
36     SetHeightWidthRatio(me:  mutable;  aRatio:  Real  from  Standard);
37         --- Purpose: Returns the height-width ratio, also known as the expansion factor.  
38     SetSpace(me :mutable; aSpace:  Length  from  Quantity); 
39         ---Purpose: Sets the length of the box which text will occupy.
40     
41     SetHeight(me: mutable;  aHeight:  Real  from  Standard);  
42         --- Purpose: Sets the height of the text.  
43     
44     SetAngle(me: mutable;  anAngle:  PlaneAngle  from  Quantity); 
45         --- Purpose: Sets the angle  
46     
47     Height(me) returns Real  from  Standard; 
48         ---Purpose: Returns the height of the text box.    
49     
50     Angle(me) returns PlaneAngle  from  Quantity; 
51         ---Purpose: Returns the angle    
52     
53     SetHorizontalJustification(me:  mutable;  aJustification:  HorizontalTextAlignment  from  Graphic3d);
54         --- Purpose: Sets horizontal alignment of text.  
55     
56     SetVerticalJustification(me:  mutable;  aJustification:  VerticalTextAlignment  from  Graphic3d);
57         --- Purpose: Sets the vertical alignment of text.
58     
59     SetOrientation(me: mutable;  anOrientation:  TextPath  from  Graphic3d); 
60         ---Purpose: Sets the orientation of text. 
61     
62     HorizontalJustification(me)  returns  HorizontalTextAlignment  from  Graphic3d; 
63         --- Purpose: Returns the horizontal alignment of the text.
64         -- The range of values includes:
65         -- -   left
66         -- -   center
67         -- -   right, and
68         -- -   normal (justified).  
69      
70     VerticalJustification(me)  returns  VerticalTextAlignment  from  Graphic3d; 
71         --- Purpose: Returns the vertical alignment of the text.
72         -- The range of values includes:
73         -- -   normal
74         -- -   top
75         -- -   cap
76         -- -   half
77         -- -   base
78         -- -   bottom 
79     
80     Orientation(me) returns  TextPath  from  Graphic3d; 
81         --- Purpose: Returns the orientation of the text.
82         -- Text can be displayed in the following directions:
83         -- -   up
84         -- -   down
85         -- -   left, or
86         -- -   right   
87     
88     Aspect(me) returns AspectText3d  from  Graphic3d;  
89         ---Purpose: Returns the purely textual attributes used in the display of text.
90         -- These include:
91         -- -   color
92         -- -   font
93         -- -   height/width ratio, that is, the expansion factor, and
94         -- -   space between characters.    
95     Print( me; s: in out OStream from Standard);
96     
97 fields
98     myTextAspect: AspectText3d  from  Graphic3d; 
99     myAngle: PlaneAngle from  Quantity;  
100     myHeight: Real from Standard;
101     myHorizontalJustification:  HorizontalTextAlignment  from  Graphic3d; 
102     myVerticalJustification:  VerticalTextAlignment  from  Graphic3d; 
103     myOrientation: TextPath  from  Graphic3d; 
104     
105 end TextAspect from Prs3d;
106
107
108
109
110
111