0023024: Update headers of OCCT files
[occt.git] / src / Aspect / Aspect_AspectLine.cxx
CommitLineData
b311480e 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
7fd59977 20
7fd59977 21
7fd59977 22
23//-Version
24
0d969553
Y
25//-Design Declaration of variables specific to the context
26// of line tracing
7fd59977 27
0d969553
Y
28//-Warning A context of line tracing is defined by :
29// - the color
30// - the type of line
31// - the thickness
7fd59977 32
33//-References
34
35//-Language C++ 2.0
36
37//-Declarations
38
39// for the class
40#include <Aspect_AspectLine.ixx>
41
42//-Aliases
43
44//-Global data definitions
45
0d969553 46// -- color
7fd59977 47// MyColor : Color;
48
0d969553 49// -- type of line
7fd59977 50// MyType : TypeOfLine;
51
0d969553 52// -- thickness
7fd59977 53// MyWidth : Standard_Real;
54
55//-Constructors
56
57//-Destructors
58
59//-Methods, in order
60
61Aspect_AspectLine::Aspect_AspectLine () {
62
63 MyColor = Quantity_NOC_YELLOW;
64 MyType = Aspect_TOL_SOLID;
65 MyWidth = 1.0;
66
67}
68
69Aspect_AspectLine::Aspect_AspectLine (const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth) {
70
71 if (AWidth <= 0.0)
72 Aspect_AspectLineDefinitionError::Raise
73 ("Bad value for LineWidth");
74
75 MyColor = AColor;
76 MyType = AType;
77 MyWidth = AWidth;
78
79}
80
81void Aspect_AspectLine::SetColor (const Quantity_Color& AColor) {
82
83 MyColor = AColor;
84
85}
86
87void Aspect_AspectLine::SetType (const Aspect_TypeOfLine AType) {
88
89 MyType = AType;
90
91}
92
93void Aspect_AspectLine::SetWidth (const Standard_Real AWidth) {
94
95 if (AWidth <= 0.0)
96 Aspect_AspectLineDefinitionError::Raise
97 ("Bad value for LineWidth");
98
99 MyWidth = AWidth;
100
101}
102
103void Aspect_AspectLine::Values (Quantity_Color& AColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
104
105 AColor = MyColor;
106 AType = MyType;
107 AWidth = MyWidth;
108
109}