b311480e |
1 | -- Created on: 1993-09-07 |
2 | -- Created by: GG |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
7fd59977 |
5 | -- |
b311480e |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
7fd59977 |
10 | -- |
b311480e |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
7fd59977 |
13 | -- |
b311480e |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
21 | -- Updated: JLF (Reason LineStyle MUST be given in METER ) 2 Mars 94 |
7fd59977 |
22 | |
23 | class LineStyle from Aspect |
24 | |
25 | ---Version: |
26 | |
27 | ---Purpose: This class allows the definition of a Line Style. |
28 | -- The Style can be Predefined or defined by the user |
29 | |
30 | ---Keywords: LineStyle |
31 | |
32 | ---Warning: |
33 | ---References: |
34 | |
35 | uses |
36 | TypeOfLine from Aspect, |
37 | Array1OfLength from TColQuantity, |
38 | HArray1OfLength from TColQuantity |
39 | |
40 | raises |
41 | LineStyleDefinitionError from Aspect |
42 | |
43 | is |
44 | Create |
45 | returns LineStyle from Aspect |
46 | ---Level: Public |
47 | ---Purpose: Creates a line style with the default value of |
48 | -- LineStyle type : SOLID |
49 | -- |
50 | raises LineStyleDefinitionError from Aspect; |
51 | -- if the maximum number of line style is exceeded |
52 | |
53 | Create ( Type : TypeOfLine from Aspect ) |
54 | returns LineStyle from Aspect ; |
55 | ---Level: Public |
56 | ---Purpose: Creates the line style <Type>. |
57 | |
58 | Create ( Style : Array1OfLength from TColQuantity ) |
59 | returns LineStyle from Aspect |
60 | ---Level: Public |
61 | ---Purpose: Creates a line style from METER Float style descriptor . |
62 | -- Style Descriptor is : |
63 | -- Each Odd float described the Drawn part of the style . |
64 | -- Each Even float described the Hidden part of the style . |
65 | -- (e.g) [0.010,0.002,0.005,0.004] |
66 | -- Draw 10 MM ,Move 2 MM,Draw 5 MM .. |
67 | raises LineStyleDefinitionError from Aspect; |
68 | -- if the METER float values are <= 0. |
69 | |
70 | --------------------------------------------------- |
71 | -- Category: Methods to modify the class definition |
72 | --------------------------------------------------- |
73 | |
74 | Assign ( me : in out ; |
75 | Other : LineStyle from Aspect ) |
76 | returns LineStyle from Aspect is static; |
77 | ---Level: Public |
78 | ---Purpose: Updates the line style <me> from the definition of the |
79 | -- line style <Other>. |
80 | ---Category: Methods to modify the class definition |
81 | ---C++: alias operator = |
82 | ---C++: return & |
83 | |
84 | SetValues ( me : in out ; |
85 | Type : TypeOfLine from Aspect ) is static; |
86 | ---Level: Public |
87 | ---Purpose: Updates the line style <me> from the definition of the |
88 | -- line style <Type>. |
89 | ---Category: Methods to modify the class definition |
90 | |
91 | SetValues ( me : in out ; |
92 | Style : Array1OfLength from TColQuantity ) |
93 | ---Level: Public |
94 | ---Purpose: Updates a line style with the new Float descriptor |
95 | raises LineStyleDefinitionError from Aspect is static; |
96 | -- if the METER float values are <= 0. |
97 | ---Category: Methods to modify the class definition |
98 | |
99 | ---------------------------- |
100 | -- Category: Inquire methods |
101 | ---------------------------- |
102 | |
103 | Style ( me ) |
104 | returns TypeOfLine from Aspect is static; |
105 | ---Level: Public |
106 | ---Purpose: Returns the type of the line style <me> |
107 | ---Category: Inquire methods |
108 | |
109 | Length ( me ) |
110 | returns Integer from Standard is static; |
111 | ---Level: Public |
112 | ---Purpose: Returns the components length of the line style |
113 | ---Category: Inquire methods |
114 | |
115 | Values ( me ) |
116 | returns Array1OfLength from TColQuantity is static; |
117 | ---Level: Public |
118 | ---Purpose: Returns the components of a line style |
119 | ---Category: Inquire methods |
120 | ---C++: return const & |
121 | |
122 | IsEqual(me; Other : LineStyle from Aspect) returns Boolean; |
123 | ---C++: alias operator== |
124 | |
125 | IsNotEqual(me; Other : LineStyle from Aspect) returns Boolean; |
126 | ---C++: alias operator!= |
127 | |
128 | ---------------------------- |
129 | -- Category: Private methods |
130 | ---------------------------- |
131 | |
132 | PredefinedStyle ( me : in out ; |
133 | Type : TypeOfLine from Aspect ) |
134 | ---Level: Internal |
135 | ---Purpose: Set MyLineDescriptor with the predefined style values |
136 | -- according of type |
137 | ---Category: Private methods |
138 | returns HArray1OfLength from TColQuantity is static private; |
139 | |
140 | --\f |
141 | |
142 | fields |
143 | |
144 | -- |
145 | -- Class : Aspect_LineStyle |
146 | -- |
147 | -- Purpose : Declaration of variables specific to line styles |
148 | -- |
149 | |
150 | MyLineType : TypeOfLine from Aspect; |
151 | MyLineDescriptor : HArray1OfLength from TColQuantity; |
152 | |
153 | end LineStyle; |