1 -- File: Prs3d_TextAspect.cdl
2 -- Created: Tue Sep 14 12:56:09 1993
3 -- Author: Jean-Louis FRENKEL
5 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
6 -- the restricted NameOfColor.
7 ---Copyright: Matra Datavision 1993
9 class TextAspect from Prs3d inherits BasicAspect from Prs3d
11 ---Purpose: Defines the attributes when displaying a text.
15 NameOfColor from Quantity,
17 AspectText3d from Graphic3d,
18 PlaneAngle from Quantity,
19 HorizontalTextAlignment from Graphic3d,
20 VerticalTextAlignment from Graphic3d,
21 TextPath from Graphic3d,
25 Create returns mutable TextAspect from Prs3d;
26 --- Purpose: Constructs an empty framework for defining display attributes of text.
28 SetColor(me: mutable; aColor: Color from Quantity);
30 SetColor(me: mutable; aColor: NameOfColor from Quantity);
31 --- Purpose: Sets the color of the type used in text display.
33 SetFont(me: mutable; aFont: CString from Standard);
34 --- Purpose: Sets the font used in text display.
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.
41 SetHeight(me: mutable; aHeight: Real from Standard);
42 --- Purpose: Sets the height of the text.
44 SetAngle(me: mutable; anAngle: PlaneAngle from Quantity);
45 --- Purpose: Sets the angle
47 Height(me) returns Real from Standard;
48 ---Purpose: Returns the height of the text box.
50 Angle(me) returns PlaneAngle from Quantity;
51 ---Purpose: Returns the angle
53 SetHorizontalJustification(me: mutable; aJustification: HorizontalTextAlignment from Graphic3d);
54 --- Purpose: Sets horizontal alignment of text.
56 SetVerticalJustification(me: mutable; aJustification: VerticalTextAlignment from Graphic3d);
57 --- Purpose: Sets the vertical alignment of text.
59 SetOrientation(me: mutable; anOrientation: TextPath from Graphic3d);
60 ---Purpose: Sets the orientation of text.
62 HorizontalJustification(me) returns HorizontalTextAlignment from Graphic3d;
63 --- Purpose: Returns the horizontal alignment of the text.
64 -- The range of values includes:
68 -- - normal (justified).
70 VerticalJustification(me) returns VerticalTextAlignment from Graphic3d;
71 --- Purpose: Returns the vertical alignment of the text.
72 -- The range of values includes:
80 Orientation(me) returns TextPath from Graphic3d;
81 --- Purpose: Returns the orientation of the text.
82 -- Text can be displayed in the following directions:
88 Aspect(me) returns AspectText3d from Graphic3d;
89 ---Purpose: Returns the purely textual attributes used in the display of text.
93 -- - height/width ratio, that is, the expansion factor, and
94 -- - space between characters.
95 Print( me; s: in out OStream from Standard);
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;
105 end TextAspect from Prs3d;