1 -- Created on: 1993-01-11
2 -- Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA )
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 class LineFontDefPattern from IGESGraph inherits LineFontEntity
19 ---Purpose : defines IGESLineFontDefPattern, Type <304> Form <2>
20 -- in package IGESGraph
22 -- Line Font may be defined by repetition of a basic pattern
23 -- of visible-blank(or, on-off) segments superimposed on
24 -- a line or a curve. The line or curve is then displayed
25 -- according to the basic pattern.
29 IGESEntity from IGESData,
30 HAsciiString from TCollection,
31 HArray1OfReal from TColStd
37 Create returns LineFontDefPattern;
39 -- Specific Methods pertaining to class
42 allSegLength : HArray1OfReal;
43 aPattern : HAsciiString);
44 ---Purpose : This method is used to set the fields of the class
46 -- - allSegLength : Containing lengths of respective segments
47 -- - aPattern : HAsciiString indicating visible-blank segments
49 NbSegments (me) returns Integer;
50 ---Purpose : returns the number of segments in the visible-blank pattern
52 Length (me; Index : Integer) returns Real
54 ---Purpose : returns the Length of Index'th segment of the basic pattern
55 -- raises exception if Index <= 0 or Index > NbSegments
57 DisplayPattern (me) returns HAsciiString from TCollection;
58 ---Purpose : returns the string indicating which segments of the basic
59 -- pattern are visible and which are blanked.
61 -- theNbSegments = 5 and if Bit Pattern = 10110, which means that
62 -- segments 2, 3 and 5 are visible, whereas segments 1 and 4 are
63 -- blank. The method returns "2H16" as the HAsciiString.
64 -- Note: The bits are right justified. (16h = 10110)
66 IsVisible (me; Index : Integer) returns Boolean;
67 ---Purpose : The Display Pattern is decrypted to
68 -- return True if the Index'th basic pattern is Visible,
70 -- If Index > NbSegments or Index <= 0 then return value is
76 -- Class : IGESGraph_LineFontDefPattern
78 -- Purpose : Declaration of the variables specific to Line Font Patterns.
80 -- Reminder : A Line Font Pattern is defined by :
81 -- - Length of each Segment
82 -- - Visible-Blank Pattern Bitmap
85 theSegmentLengths : HArray1OfReal;
87 theDisplayPattern : HAsciiString;
89 end LineFontDefPattern;