1 -- Created on: 1993-09-09
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
22 -- Updated by JLF (Reason : Width MUST be given in METER 2 Mars 94)
24 class WidthMapEntry from Aspect
28 ---Purpose: This class defines a widthmap entry.
29 -- A widthmap entry is an association between
30 -- a LineStyle object and an index in the widthmap.
36 WidthOfLine from Aspect,
40 OutOfRange from Standard,
45 returns WidthMapEntry from Aspect;
47 ---Purpose: Creates an unallocated widthmap entry
49 Create ( index : Integer from Standard;
50 style : WidthOfLine from Aspect)
51 returns WidthMapEntry;
53 ---Purpose: Creates an allocated widthmap entry from width style
55 Create ( index : Integer from Standard;
56 width : Length from Quantity)
57 returns WidthMapEntry;
59 ---Purpose: Creates an allocated widthmap entry from width value
61 Create ( entry : WidthMapEntry from Aspect )
64 ---Purpose: Creates an allocated widthmap entry.
65 ---Warning: Raises error if the widthmap entry <entry>
67 raises BadAccess from Aspect;
69 SetValue ( me: in out; index : Integer from Standard;
70 style : WidthOfLine from Aspect );
72 ---Purpose: Sets widthmap entry value from width style
75 SetValue ( me: in out; index : Integer from Standard;
76 width : Length from Quantity);
78 ---Purpose: Sets widthmap entry value from width value
81 SetValue ( me: in out; entry : WidthMapEntry from Aspect);
83 ---Purpose: Sets widthmap entry value and allocates it.
84 ---C++: alias operator =
86 SetIndex ( me: in out; index : Integer from Standard);
88 ---Purpose: Sets index value of a widthmap entry.
90 SetType ( me: in out; Style : WidthOfLine from Aspect );
92 ---Purpose: Sets width style of widthmap entry.
94 SetWidth ( me: in out; Width : Length from Quantity);
96 ---Purpose: Sets width value of widthmap entry.
98 Type ( me ) returns WidthOfLine from Aspect
100 ---Warning: Raises error if the widthmap entry is unallocated .
101 raises BadAccess from Aspect;
103 Width ( me ) returns Length from Quantity
105 ---Purpose: Returns width value of widthmap entry.
106 -- Warning: Raises error if the widthmap entry is unallocated .
107 raises BadAccess from Aspect;
109 Index ( me ) returns Integer from Standard
111 ---Purpose: Returns index value of a widthmap entry.
112 -- Warning: Raises error if the widthmap entry is unallocated .
113 raises BadAccess from Aspect;
115 Free ( me : in out );
117 ---Purpose: Unallocates the widthmap entry.
119 IsAllocated ( me ) returns Boolean from Standard;
121 ---Purpose: Returns True if the widthmap entry is allocated.
122 -- Warning: A widthmap entry is allocated when the width and
123 -- the index is defined.
128 ----------------------------
129 -- Category: Private methods
130 ----------------------------
132 SetPredefinedStyle ( me : in out;
133 Type : WidthOfLine from Aspect )
135 ---Purpose: Set Line Width with the predefined style values
137 -- Warning: Raises error if the Width style is USER_DEFINED
138 raises BadAccess from Aspect is private;
139 ---Category: Private methods
142 MyType : WidthOfLine from Aspect;
143 MyWidth : Real from Standard;
144 MyIndex : Integer from Standard;
145 MyTypeIsDef : Boolean from Standard;
146 MyIndexIsDef : Boolean from Standard;
148 end WidthMapEntry from Aspect;