2420d8093e3587d5aa167d65ea863b65f20d2100
[occt.git] / src / Prs3d / Prs3d_TextAspect.cdl
1 -- Created on: 1993-09-14
2 -- Created by: Jean-Louis FRENKEL
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 --   GG  : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
18 --                     the restricted NameOfColor.
19
20 class TextAspect from Prs3d inherits BasicAspect from Prs3d
21
22         ---Purpose: Defines the attributes when displaying a text.
23           
24           
25 uses
26     NameOfColor from Quantity, 
27     Color   from Quantity,
28     AspectText3d from Graphic3d,  
29     PlaneAngle from Quantity, 
30     HorizontalTextAlignment  from  Graphic3d, 
31     VerticalTextAlignment  from  Graphic3d, 
32     TextPath from Graphic3d,
33     Length from Quantity
34     
35 is
36     Create returns TextAspect from Prs3d;  
37         --- Purpose: Constructs an empty framework for defining display attributes of text.   
38
39     SetColor(me: mutable; aColor:  Color  from  Quantity);
40  
41     SetColor(me: mutable; aColor:  NameOfColor  from  Quantity);
42         --- Purpose: Sets the color of the type used in text display.
43
44     SetFont(me: mutable; aFont:  CString  from  Standard);
45         --- Purpose: Sets the font used in text display.  
46     
47     SetHeightWidthRatio(me:  mutable;  aRatio:  Real  from  Standard);
48         --- Purpose: Returns the height-width ratio, also known as the expansion factor.  
49     SetSpace(me :mutable; aSpace:  Length  from  Quantity); 
50         ---Purpose: Sets the length of the box which text will occupy.
51     
52     SetHeight(me: mutable;  aHeight:  Real  from  Standard);  
53         --- Purpose: Sets the height of the text.  
54     
55     SetAngle(me: mutable;  anAngle:  PlaneAngle  from  Quantity); 
56         --- Purpose: Sets the angle  
57     
58     Height(me) returns Real  from  Standard; 
59         ---Purpose: Returns the height of the text box.    
60     
61     Angle(me) returns PlaneAngle  from  Quantity; 
62         ---Purpose: Returns the angle    
63     
64     SetHorizontalJustification(me:  mutable;  aJustification:  HorizontalTextAlignment  from  Graphic3d);
65         --- Purpose: Sets horizontal alignment of text.  
66     
67     SetVerticalJustification(me:  mutable;  aJustification:  VerticalTextAlignment  from  Graphic3d);
68         --- Purpose: Sets the vertical alignment of text.
69     
70     SetOrientation(me: mutable;  anOrientation:  TextPath  from  Graphic3d); 
71         ---Purpose: Sets the orientation of text. 
72     
73     HorizontalJustification(me)  returns  HorizontalTextAlignment  from  Graphic3d; 
74         --- Purpose: Returns the horizontal alignment of the text.
75         -- The range of values includes:
76         -- -   left
77         -- -   center
78         -- -   right, and
79         -- -   normal (justified).  
80      
81     VerticalJustification(me)  returns  VerticalTextAlignment  from  Graphic3d; 
82         --- Purpose: Returns the vertical alignment of the text.
83         -- The range of values includes:
84         -- -   normal
85         -- -   top
86         -- -   cap
87         -- -   half
88         -- -   base
89         -- -   bottom 
90     
91     Orientation(me) returns  TextPath  from  Graphic3d; 
92         --- Purpose: Returns the orientation of the text.
93         -- Text can be displayed in the following directions:
94         -- -   up
95         -- -   down
96         -- -   left, or
97         -- -   right   
98     
99     Aspect(me) returns AspectText3d  from  Graphic3d;  
100         ---Purpose: Returns the purely textual attributes used in the display of text.
101         -- These include:
102         -- -   color
103         -- -   font
104         -- -   height/width ratio, that is, the expansion factor, and
105         -- -   space between characters.
106     
107 fields
108     myTextAspect: AspectText3d  from  Graphic3d; 
109     myAngle: PlaneAngle from  Quantity;  
110     myHeight: Real from Standard;
111     myHorizontalJustification:  HorizontalTextAlignment  from  Graphic3d; 
112     myVerticalJustification:  VerticalTextAlignment  from  Graphic3d; 
113     myOrientation: TextPath  from  Graphic3d; 
114     
115 end TextAspect from Prs3d;
116
117
118
119
120
121