1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _Aspect_AspectLine_HeaderFile
17 #define _Aspect_AspectLine_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <Quantity_Color.hxx>
23 #include <Aspect_TypeOfLine.hxx>
24 #include <Standard_Real.hxx>
25 #include <MMgt_TShared.hxx>
26 class Aspect_AspectLineDefinitionError;
30 class Aspect_AspectLine;
31 DEFINE_STANDARD_HANDLE(Aspect_AspectLine, MMgt_TShared)
33 //! This class allows the definition of a group
34 //! of attributes for the LINE primitive
35 //! The attributes are:
39 //! When any value of the group is modified
40 //! all graphic objects using the group are modified.
41 class Aspect_AspectLine : public MMgt_TShared
47 //! Modifies the colour of <me>.
48 Standard_EXPORT void SetColor (const Quantity_Color& AColor);
50 //! Modifies the type of <me>.
51 Standard_EXPORT void SetType (const Aspect_TypeOfLine AType);
53 //! Modifies the thickness of <me>.
54 //! Category: Methods to modify the class definition
55 //! Warning: Raises AspectLineDefinitionError if the
56 //! width is a negative value.
57 Standard_EXPORT void SetWidth (const Standard_Real AWidth);
59 //! Returns the current values of the group <me>.
60 Standard_EXPORT void Values (Quantity_Color& AColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const;
65 DEFINE_STANDARD_RTTIEXT(Aspect_AspectLine,MMgt_TShared)
70 //! Initialise the constructor for Graphic3d_AspectLine3d.
73 //! Color = Quantity_NOC_YELLOW;
74 //! Type = Aspect_TOL_SOLID;
76 Standard_EXPORT Aspect_AspectLine();
78 //! Initialise the values for the
79 //! constructor of Graphic3d_AspectLine3d.
80 Standard_EXPORT Aspect_AspectLine(const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth);
87 Quantity_Color MyColor;
88 Aspect_TypeOfLine MyType;
89 Standard_Real MyWidth;
100 #endif // _Aspect_AspectLine_HeaderFile