0023634: Eliminate Polyline and Polygon usage in drawers
[occt.git] / src / Prs3d / Prs3d_LineAspect.cdl
1 -- Created on: 1993-04-26
2 -- Created by: Jean-Louis Frenkel
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
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.
10 --
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.
13 --
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 --   GG  : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22 --                                     the restricted NameOfColor.
23
24
25 class LineAspect from Prs3d inherits BasicAspect from Prs3d
26         ---Purpose: A framework for defining how a line will be displayed
27         -- in a presentation. Aspects of line display include
28         -- width, color and type of line.
29         -- The definition set by this class is then passed to the
30         -- attribute manager Prs3d_Drawer.
31         -- Any object which requires a value for line aspect as
32         -- an argument may then be given the attribute manager
33         -- as a substitute argument in the form of a field such as myDrawer for example.
34 uses 
35
36     AspectLine3d from Graphic3d,
37     NameOfColor from Quantity,
38     Color from Quantity,
39     TypeOfLine from Aspect
40
41 is
42
43 -- 
44 --  Attributes for the lines.
45 -- 
46     Create (aColor: NameOfColor from Quantity;
47             aType: TypeOfLine from Aspect;
48             aWidth: Real from Standard)
49             returns mutable LineAspect from Prs3d;
50         ---Purpose: Constructs a framework for line aspect defined by
51         -- -   the color aColor
52         -- -   the type of line aType and
53         -- -   the line thickness aWidth.
54         --   Type of line refers to whether the line is solid or dotted, for example.
55         
56     Create (aColor: Color from Quantity;
57             aType: TypeOfLine from Aspect;
58             aWidth: Real from Standard)
59             returns mutable LineAspect from Prs3d;
60             
61     SetColor (me: mutable; aColor: Color from Quantity) is static;
62
63     SetColor (me: mutable; aColor: NameOfColor from Quantity) 
64         ---Purpose: Sets the line color defined at the time of construction.
65         --          Default value: Quantity_NOC_YELLOW
66     is static;
67     
68     SetTypeOfLine (me: mutable; aType: TypeOfLine from Aspect) 
69         ---Purpose: Sets the type of line defined at the time of construction.
70         -- This could, for example, be solid, dotted or made up of dashes.
71         --          Default value: Aspect_TOL_SOLID
72     is static;
73     
74     SetWidth  (me: mutable; aWidth: Real from Standard) 
75         ---Purpose: Sets the line width defined at the time of construction.
76         --          Default value: 1.
77     is static;
78
79     Aspect(me) returns AspectLine3d from Graphic3d 
80     is static;
81         --- Purpose: Returns the line aspect. This is defined as the set of
82         -- color, type and thickness attributes.
83             
84 fields
85
86     myAspect: AspectLine3d from Graphic3d;
87
88 end LineAspect from Prs3d;