0024624: Lost word in license statement in source files
[occt.git] / src / Aspect / Aspect_AspectFillArea.cxx
CommitLineData
b311480e 1// Created by: NW,JPB,CAL
2// Copyright (c) 1991-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
7fd59977 16// Modified: 15/01/98 ; FMN : Ajout Hidden Line
17
7fd59977 18
19//-Version
20
0d969553
Y
21//-Design Declaration of variables specific to the context
22// of tracing facets
7fd59977 23
0d969553
Y
24//-Warning Context of tracing facets id defined by:
25// - the style of the interior of the facet
26// - the style of the border of the facet
27// - the color
7fd59977 28
29//-References
30
31//-Language C++ 2.0
32
33//-Declarations
34
35// for the class
36#include <Aspect_AspectFillArea.ixx>
37
38//-Aliases
39
40//-Global data definitions
41
0d969553 42// -- interior
7fd59977 43// MyInteriorStyle : InteriorStyle;
44// MyInteriorColor : Color;
45
0d969553 46// -- border
7fd59977 47// MyEdgeColor : Color;
48// MyEdgeType : TypeOfLine;
49// MyEdgeWidth : Standard_Real;
50
0d969553 51// -- shading
7fd59977 52// MyHatchStyle : HatchStyle;
53
54
55#define OCC1174 // SAV : 08/01/03 Added back face interior color
56
57//-Constructors
58
59//-Destructors
60
61//-Methods, in order
62
63Aspect_AspectFillArea::Aspect_AspectFillArea () {
64
65 MyInteriorStyle = Aspect_IS_EMPTY;
66 MyInteriorColor = Quantity_NOC_CYAN1;
67#ifdef OCC1174
68 MyBackInteriorColor = Quantity_NOC_CYAN1;
69#endif
70 MyEdgeColor = Quantity_NOC_WHITE;
71 MyEdgeType = Aspect_TOL_SOLID;
72 MyEdgeWidth = 1.0;
73 MyHatchStyle = Aspect_HS_VERTICAL;
74
75}
76
77Aspect_AspectFillArea::Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth) {
78
79 if (EdgeLineWidth <= 0.0)
80 Aspect_AspectFillAreaDefinitionError::Raise
81 ("Bad value for EdgeLineWidth");
82
83 MyInteriorStyle = InteriorStyle;
84 MyInteriorColor = InteriorColor;
85 MyEdgeColor = EdgeColor;
86 MyEdgeType = EdgeLineType;
87 MyEdgeWidth = EdgeLineWidth;
88 MyHatchStyle = Aspect_HS_VERTICAL;
89
90}
91
92void Aspect_AspectFillArea::SetInteriorStyle (const Aspect_InteriorStyle AStyle) {
93
94 MyInteriorStyle = AStyle;
95
96}
97
98void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
99
100 MyInteriorColor = AColor;
101
102}
103
104void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
105{
106#ifdef OCC1174
107 MyBackInteriorColor = color;
108#endif
109}
110
111void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
112
113 MyEdgeColor = AColor;
114
115}
116
117void Aspect_AspectFillArea::SetEdgeLineType (const Aspect_TypeOfLine AType) {
118
119 MyEdgeType = AType;
120
121}
122
123void Aspect_AspectFillArea::SetEdgeWidth (const Standard_Real AWidth) {
124
125 if (AWidth <= 0.0)
126 Aspect_AspectFillAreaDefinitionError::Raise
127 ("Bad value for EdgeLineWidth");
128
129 MyEdgeWidth = AWidth;
130
131}
132
133void Aspect_AspectFillArea::SetHatchStyle (const Aspect_HatchStyle AStyle) {
134
135 MyHatchStyle = AStyle;
136
137}
138
139Aspect_HatchStyle Aspect_AspectFillArea::HatchStyle () const {
140
141 return (MyHatchStyle);
142
143}
144
145void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
146
147 AStyle = MyInteriorStyle;
148 AIntColor = MyInteriorColor;
149 AEdgeColor = MyEdgeColor;
150 AType = MyEdgeType;
151 AWidth = MyEdgeWidth;
152
153}
154
155void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
156
157 AStyle = MyInteriorStyle;
158 AIntColor = MyInteriorColor;
159#ifdef OCC1174
160 BackIntColor = MyBackInteriorColor;
161#endif
162 AEdgeColor = MyEdgeColor;
163 AType = MyEdgeType;
164 AWidth = MyEdgeWidth;
165
166}