b311480e |
1 | -- Created on: 1993-09-07 |
2 | -- Created by: GG |
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 | -- |
973c2be1 |
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. |
7fd59977 |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
b311480e |
16 | |
17 | -- Updated: JLF (Reason LineStyle MUST be given in METER ) 2 Mars 94 |
7fd59977 |
18 | |
19 | class LineStyle from Aspect |
20 | |
21 | ---Version: |
22 | |
23 | ---Purpose: This class allows the definition of a Line Style. |
24 | -- The Style can be Predefined or defined by the user |
25 | |
26 | ---Keywords: LineStyle |
27 | |
28 | ---Warning: |
29 | ---References: |
30 | |
31 | uses |
32 | TypeOfLine from Aspect, |
33 | Array1OfLength from TColQuantity, |
34 | HArray1OfLength from TColQuantity |
35 | |
36 | raises |
37 | LineStyleDefinitionError from Aspect |
38 | |
39 | is |
40 | Create |
41 | returns LineStyle from Aspect |
42 | ---Level: Public |
43 | ---Purpose: Creates a line style with the default value of |
44 | -- LineStyle type : SOLID |
45 | -- |
46 | raises LineStyleDefinitionError from Aspect; |
47 | -- if the maximum number of line style is exceeded |
48 | |
49 | Create ( Type : TypeOfLine from Aspect ) |
50 | returns LineStyle from Aspect ; |
51 | ---Level: Public |
52 | ---Purpose: Creates the line style <Type>. |
53 | |
54 | Create ( Style : Array1OfLength from TColQuantity ) |
55 | returns LineStyle from Aspect |
56 | ---Level: Public |
57 | ---Purpose: Creates a line style from METER Float style descriptor . |
58 | -- Style Descriptor is : |
59 | -- Each Odd float described the Drawn part of the style . |
60 | -- Each Even float described the Hidden part of the style . |
61 | -- (e.g) [0.010,0.002,0.005,0.004] |
62 | -- Draw 10 MM ,Move 2 MM,Draw 5 MM .. |
63 | raises LineStyleDefinitionError from Aspect; |
64 | -- if the METER float values are <= 0. |
65 | |
66 | --------------------------------------------------- |
67 | -- Category: Methods to modify the class definition |
68 | --------------------------------------------------- |
69 | |
70 | Assign ( me : in out ; |
71 | Other : LineStyle from Aspect ) |
72 | returns LineStyle from Aspect is static; |
73 | ---Level: Public |
74 | ---Purpose: Updates the line style <me> from the definition of the |
75 | -- line style <Other>. |
76 | ---Category: Methods to modify the class definition |
77 | ---C++: alias operator = |
78 | ---C++: return & |
79 | |
80 | SetValues ( me : in out ; |
81 | Type : TypeOfLine from Aspect ) is static; |
82 | ---Level: Public |
83 | ---Purpose: Updates the line style <me> from the definition of the |
84 | -- line style <Type>. |
85 | ---Category: Methods to modify the class definition |
86 | |
87 | SetValues ( me : in out ; |
88 | Style : Array1OfLength from TColQuantity ) |
89 | ---Level: Public |
90 | ---Purpose: Updates a line style with the new Float descriptor |
91 | raises LineStyleDefinitionError from Aspect is static; |
92 | -- if the METER float values are <= 0. |
93 | ---Category: Methods to modify the class definition |
94 | |
95 | ---------------------------- |
96 | -- Category: Inquire methods |
97 | ---------------------------- |
98 | |
99 | Style ( me ) |
100 | returns TypeOfLine from Aspect is static; |
101 | ---Level: Public |
102 | ---Purpose: Returns the type of the line style <me> |
103 | ---Category: Inquire methods |
104 | |
105 | Length ( me ) |
106 | returns Integer from Standard is static; |
107 | ---Level: Public |
108 | ---Purpose: Returns the components length of the line style |
109 | ---Category: Inquire methods |
110 | |
111 | Values ( me ) |
112 | returns Array1OfLength from TColQuantity is static; |
113 | ---Level: Public |
114 | ---Purpose: Returns the components of a line style |
115 | ---Category: Inquire methods |
116 | ---C++: return const & |
117 | |
118 | IsEqual(me; Other : LineStyle from Aspect) returns Boolean; |
119 | ---C++: alias operator== |
120 | |
121 | IsNotEqual(me; Other : LineStyle from Aspect) returns Boolean; |
122 | ---C++: alias operator!= |
123 | |
124 | ---------------------------- |
125 | -- Category: Private methods |
126 | ---------------------------- |
127 | |
128 | PredefinedStyle ( me : in out ; |
129 | Type : TypeOfLine from Aspect ) |
130 | ---Level: Internal |
131 | ---Purpose: Set MyLineDescriptor with the predefined style values |
132 | -- according of type |
133 | ---Category: Private methods |
134 | returns HArray1OfLength from TColQuantity is static private; |
135 | |
136 | --\f |
137 | |
138 | fields |
139 | |
140 | -- |
141 | -- Class : Aspect_LineStyle |
142 | -- |
143 | -- Purpose : Declaration of variables specific to line styles |
144 | -- |
145 | |
146 | MyLineType : TypeOfLine from Aspect; |
147 | MyLineDescriptor : HArray1OfLength from TColQuantity; |
148 | |
149 | end LineStyle; |