1 -- Created on: 1996-12-24
2 -- Created by: Alexander BRIVIN
3 -- Copyright (c) 1996-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
9 -- under the terms of the GNU Lesser General Public 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 class AsciiText from Vrml inherits TShared from MMgt
19 ---Purpose: defines a AsciiText node of VRML specifying geometry shapes.
20 -- This node represents strings of text characters from ASCII coded
21 -- character set. All subsequent strings advance y by -( size * spacing).
22 -- The justification field determines the placement of the strings in the x
23 -- dimension. LEFT (the default) places the left edge of each string at x=0.
24 -- CENTER places the center of each string at x=0. RIGHT places the right edge
25 -- of each string at x=0. Text is rendered from left to right, top to
26 -- bottom in the font set by FontStyle.
27 -- The default value for the wigth field indicates the natural width
28 -- should be used for that string.
32 AsciiTextJustification from Vrml,
33 HArray1OfAsciiString from TColStd
37 Create returns mutable AsciiText from Vrml;
39 Create ( aString : HArray1OfAsciiString from TColStd;
40 aSpacing : Real from Standard;
41 aJustification : AsciiTextJustification;
42 aWidth : Real from Standard )
43 returns mutable AsciiText from Vrml;
45 SetString ( me : mutable; aString : HArray1OfAsciiString from TColStd );
46 String ( me ) returns HArray1OfAsciiString from TColStd;
48 SetSpacing ( me : mutable; aSpacing : Real from Standard );
49 Spacing ( me ) returns Real from Standard;
51 SetJustification ( me : mutable; aJustification : AsciiTextJustification from Vrml );
52 Justification ( me ) returns AsciiTextJustification from Vrml;
54 SetWidth ( me : mutable; aWidth : Real from Standard );
55 Width ( me ) returns Real from Standard;
57 Print ( me; anOStream: in out OStream from Standard) returns OStream from Standard;
62 myString : HArray1OfAsciiString from TColStd; -- Text string
63 mySpacing : Real from Standard; -- Inter-string spacing
64 myJustification : AsciiTextJustification from Vrml; -- Text justification
65 myWidth : Real from Standard; -- Suggested width constraint