b311480e |
1 | -- Created on: 1993-01-11 |
2 | -- Created by: CKY / Contract Toubro-Larsen ( Niraj RANGWALA ) |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
7fd59977 |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class LineFontDefPattern from IGESGraph inherits LineFontEntity |
18 | |
19 | ---Purpose : defines IGESLineFontDefPattern, Type <304> Form <2> |
20 | -- in package IGESGraph |
21 | -- |
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. |
26 | |
27 | uses |
28 | |
29 | IGESEntity from IGESData, |
30 | HAsciiString from TCollection, |
31 | HArray1OfReal from TColStd |
32 | |
33 | raises OutOfRange |
34 | |
35 | is |
36 | |
6e33d3ce |
37 | Create returns LineFontDefPattern; |
7fd59977 |
38 | |
39 | -- Specific Methods pertaining to class |
40 | |
41 | Init (me : mutable; |
42 | allSegLength : HArray1OfReal; |
43 | aPattern : HAsciiString); |
44 | ---Purpose : This method is used to set the fields of the class |
45 | -- LineFontDefPattern |
46 | -- - allSegLength : Containing lengths of respective segments |
47 | -- - aPattern : HAsciiString indicating visible-blank segments |
48 | |
49 | NbSegments (me) returns Integer; |
50 | ---Purpose : returns the number of segments in the visible-blank pattern |
51 | |
52 | Length (me; Index : Integer) returns Real |
53 | raises OutOfRange; |
54 | ---Purpose : returns the Length of Index'th segment of the basic pattern |
55 | -- raises exception if Index <= 0 or Index > NbSegments |
56 | |
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. |
60 | -- e.g: |
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) |
65 | |
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, |
69 | -- False otherwise. |
70 | -- If Index > NbSegments or Index <= 0 then return value is |
71 | -- False. |
72 | |
73 | fields |
74 | |
75 | -- |
76 | -- Class : IGESGraph_LineFontDefPattern |
77 | -- |
78 | -- Purpose : Declaration of the variables specific to Line Font Patterns. |
79 | -- |
80 | -- Reminder : A Line Font Pattern is defined by : |
81 | -- - Length of each Segment |
82 | -- - Visible-Blank Pattern Bitmap |
83 | -- |
84 | |
85 | theSegmentLengths : HArray1OfReal; |
86 | |
87 | theDisplayPattern : HAsciiString; |
88 | |
89 | end LineFontDefPattern; |