e565b1423037318ba966c5b26652b5ca83ce37ff
[occt.git] / src / Aspect / Aspect_AspectLine.cdl
1 -- Created by: NW,JPB,CAL
2 -- Copyright (c) 1991-1999 Matra Datavision
3 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
4 --
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
9 --
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 --
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
19
20
21 deferred class AspectLine from Aspect
22         
23 inherits
24
25         TShared
26
27         ---Purpose: This class allows the definition of a group
28         --          of attributes for the LINE primitive
29         --          The attributes are:
30         --              * Colour
31         --              * Type
32         --              * Thickness
33         --          When any value of the group is modified
34         --          all graphic objects using the group are modified.
35
36 uses
37
38         Color           from Quantity,
39
40         TypeOfLine      from Aspect 
41
42 raises
43
44         AspectLineDefinitionError       from Aspect
45
46 is
47
48         Initialize;
49         ---Level: Public
50         ---Purpose: Initialise the constructor for Graphic3d_AspectLine3d.
51         --
52         -- Default values :
53         --              Color = Quantity_NOC_YELLOW;
54         --              Type  = Aspect_TOL_SOLID;
55         --              Width = 1.0;
56         --
57
58         Initialize ( AColor     : Color from Quantity;
59                      AType      : TypeOfLine from Aspect;
60                      AWidth     : Real from Standard )
61         ---Level: Public
62         ---Purpose: Initialise the values for the
63         --          constructor of Graphic3d_AspectLine3d.
64         --
65         raises AspectLineDefinitionError from Aspect;
66         -- if the width is a negative value.
67
68         ---------------------------------------------------
69         -- Category: Methods to modify the class definition
70         ---------------------------------------------------
71
72         SetColor ( me           : mutable;
73                    AColor       : Color from Quantity );
74         ---Level: Public
75         ---Purpose: Modifies the colour of <me>.
76         ---Category: Methods to modify the class definition
77
78         SetType ( me    : mutable;
79                   AType : TypeOfLine from Aspect );
80         ---Level: Public
81         ---Purpose: Modifies the type of <me>.
82         ---Category: Methods to modify the class definition
83
84         SetWidth ( me           : mutable;
85                    AWidth       : Real from Standard )
86         ---Level: Public
87         ---Purpose: Modifies the thickness of <me>.
88         --  Category: Methods to modify the class definition
89         --  Warning: Raises AspectLineDefinitionError if the
90         --          width is a negative value.
91         raises AspectLineDefinitionError from Aspect;
92
93         ----------------------------
94         -- Category: Inquire methods
95         ----------------------------
96
97         Values ( me;
98                  AColor : out Color from Quantity;
99                  AType  : out TypeOfLine from Aspect;
100                  AWidth : out Real from Standard );
101         ---Level: Public
102         ---Purpose: Returns the current values of the group <me>.
103         ---Category: Inquire methods
104
105 --\f
106
107 fields
108
109 --
110 -- Class        :       Aspect_AspectLine
111 --
112 -- Purpose      :       Declaration of variables specific to
113 --                      drawing lines
114 --
115 -- Reminder     :       A line drawing context is defined by:
116 --                      - the colour
117 --                      - the type
118 --                      - the thickness
119 --
120
121         -- the colour
122         MyColor :       Color from Quantity;
123
124         -- the type
125         MyType  :       TypeOfLine from Aspect;
126
127         -- the thickness
128         MyWidth :       Real from Standard;
129
130 end AspectLine;