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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
18 -- the restricted NameOfColor.
20 class TextAspect from Prs3d inherits BasicAspect from Prs3d
22 ---Purpose: Defines the attributes when displaying a text.
26 NameOfColor from Quantity,
28 AspectText3d from Graphic3d,
29 PlaneAngle from Quantity,
30 HorizontalTextAlignment from Graphic3d,
31 VerticalTextAlignment from Graphic3d,
32 TextPath from Graphic3d,
36 Create returns TextAspect from Prs3d;
37 --- Purpose: Constructs an empty framework for defining display attributes of text.
39 SetColor(me: mutable; aColor: Color from Quantity);
41 SetColor(me: mutable; aColor: NameOfColor from Quantity);
42 --- Purpose: Sets the color of the type used in text display.
44 SetFont(me: mutable; aFont: CString from Standard);
45 --- Purpose: Sets the font used in text display.
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.
52 SetHeight(me: mutable; aHeight: Real from Standard);
53 --- Purpose: Sets the height of the text.
55 SetAngle(me: mutable; anAngle: PlaneAngle from Quantity);
56 --- Purpose: Sets the angle
58 Height(me) returns Real from Standard;
59 ---Purpose: Returns the height of the text box.
61 Angle(me) returns PlaneAngle from Quantity;
62 ---Purpose: Returns the angle
64 SetHorizontalJustification(me: mutable; aJustification: HorizontalTextAlignment from Graphic3d);
65 --- Purpose: Sets horizontal alignment of text.
67 SetVerticalJustification(me: mutable; aJustification: VerticalTextAlignment from Graphic3d);
68 --- Purpose: Sets the vertical alignment of text.
70 SetOrientation(me: mutable; anOrientation: TextPath from Graphic3d);
71 ---Purpose: Sets the orientation of text.
73 HorizontalJustification(me) returns HorizontalTextAlignment from Graphic3d;
74 --- Purpose: Returns the horizontal alignment of the text.
75 -- The range of values includes:
79 -- - normal (justified).
81 VerticalJustification(me) returns VerticalTextAlignment from Graphic3d;
82 --- Purpose: Returns the vertical alignment of the text.
83 -- The range of values includes:
91 Orientation(me) returns TextPath from Graphic3d;
92 --- Purpose: Returns the orientation of the text.
93 -- Text can be displayed in the following directions:
99 Aspect(me) returns AspectText3d from Graphic3d;
100 ---Purpose: Returns the purely textual attributes used in the display of text.
104 -- - height/width ratio, that is, the expansion factor, and
105 -- - space between characters.
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;
115 end TextAspect from Prs3d;