1 // Created by: NW,JPB,CAL
2 // Copyright (c) 1991-1999 Matra Datavision
3 // Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
21 // Modified: 15/01/98 ; FMN : Ajout Hidden Line
26 //-Design Declaration of variables specific to the context
29 //-Warning Context of tracing facets id defined by:
30 // - the style of the interior of the facet
31 // - the style of the border of the facet
41 #include <Aspect_AspectFillArea.ixx>
45 //-Global data definitions
48 // MyInteriorStyle : InteriorStyle;
49 // MyInteriorColor : Color;
52 // MyEdgeColor : Color;
53 // MyEdgeType : TypeOfLine;
54 // MyEdgeWidth : Standard_Real;
57 // MyHatchStyle : HatchStyle;
60 #define OCC1174 // SAV : 08/01/03 Added back face interior color
68 Aspect_AspectFillArea::Aspect_AspectFillArea () {
70 MyInteriorStyle = Aspect_IS_EMPTY;
71 MyInteriorColor = Quantity_NOC_CYAN1;
73 MyBackInteriorColor = Quantity_NOC_CYAN1;
75 MyEdgeColor = Quantity_NOC_WHITE;
76 MyEdgeType = Aspect_TOL_SOLID;
78 MyHatchStyle = Aspect_HS_VERTICAL;
82 Aspect_AspectFillArea::Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth) {
84 if (EdgeLineWidth <= 0.0)
85 Aspect_AspectFillAreaDefinitionError::Raise
86 ("Bad value for EdgeLineWidth");
88 MyInteriorStyle = InteriorStyle;
89 MyInteriorColor = InteriorColor;
90 MyEdgeColor = EdgeColor;
91 MyEdgeType = EdgeLineType;
92 MyEdgeWidth = EdgeLineWidth;
93 MyHatchStyle = Aspect_HS_VERTICAL;
97 void Aspect_AspectFillArea::SetInteriorStyle (const Aspect_InteriorStyle AStyle) {
99 MyInteriorStyle = AStyle;
103 void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
105 MyInteriorColor = AColor;
109 void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
112 MyBackInteriorColor = color;
116 void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
118 MyEdgeColor = AColor;
122 void Aspect_AspectFillArea::SetEdgeLineType (const Aspect_TypeOfLine AType) {
128 void Aspect_AspectFillArea::SetEdgeWidth (const Standard_Real AWidth) {
131 Aspect_AspectFillAreaDefinitionError::Raise
132 ("Bad value for EdgeLineWidth");
134 MyEdgeWidth = AWidth;
138 void Aspect_AspectFillArea::SetHatchStyle (const Aspect_HatchStyle AStyle) {
140 MyHatchStyle = AStyle;
144 Aspect_HatchStyle Aspect_AspectFillArea::HatchStyle () const {
146 return (MyHatchStyle);
150 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
152 AStyle = MyInteriorStyle;
153 AIntColor = MyInteriorColor;
154 AEdgeColor = MyEdgeColor;
156 AWidth = MyEdgeWidth;
160 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
162 AStyle = MyInteriorStyle;
163 AIntColor = MyInteriorColor;
165 BackIntColor = MyBackInteriorColor;
167 AEdgeColor = MyEdgeColor;
169 AWidth = MyEdgeWidth;