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
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.
21 -- GG : GER61351 17/11/1999 Change SetColor() with a compatible Quantity_Color instead
22 -- the restricted NameOfColor.
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.
36 AspectLine3d from Graphic3d,
37 NameOfColor from Quantity,
39 TypeOfLine from Aspect
44 -- Attributes for the lines.
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
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.
56 Create (aColor: Color from Quantity;
57 aType: TypeOfLine from Aspect;
58 aWidth: Real from Standard)
59 returns mutable LineAspect from Prs3d;
61 SetColor (me: mutable; aColor: Color from Quantity) is static;
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
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
74 SetWidth (me: mutable; aWidth: Real from Standard)
75 ---Purpose: Sets the line width defined at the time of construction.
79 Aspect(me) returns AspectLine3d from Graphic3d
81 --- Purpose: Returns the line aspect. This is defined as the set of
82 -- color, type and thickness attributes.
86 myAspect: AspectLine3d from Graphic3d;
88 end LineAspect from Prs3d;