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
8 // under the terms of the GNU Lesser General Public 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 // Modified: 15/01/98 ; FMN : Ajout Hidden Line
21 //-Design Declaration of variables specific to the context
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
36 #include <Aspect_AspectFillArea.ixx>
40 //-Global data definitions
43 // MyInteriorStyle : InteriorStyle;
44 // MyInteriorColor : Color;
47 // MyEdgeColor : Color;
48 // MyEdgeType : TypeOfLine;
49 // MyEdgeWidth : Standard_Real;
52 // MyHatchStyle : HatchStyle;
55 #define OCC1174 // SAV : 08/01/03 Added back face interior color
63 Aspect_AspectFillArea::Aspect_AspectFillArea () {
65 MyInteriorStyle = Aspect_IS_EMPTY;
66 MyInteriorColor = Quantity_NOC_CYAN1;
68 MyBackInteriorColor = Quantity_NOC_CYAN1;
70 MyEdgeColor = Quantity_NOC_WHITE;
71 MyEdgeType = Aspect_TOL_SOLID;
73 MyHatchStyle = Aspect_HS_VERTICAL;
77 Aspect_AspectFillArea::Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth) {
79 if (EdgeLineWidth <= 0.0)
80 Aspect_AspectFillAreaDefinitionError::Raise
81 ("Bad value for EdgeLineWidth");
83 MyInteriorStyle = InteriorStyle;
84 MyInteriorColor = InteriorColor;
85 MyEdgeColor = EdgeColor;
86 MyEdgeType = EdgeLineType;
87 MyEdgeWidth = EdgeLineWidth;
88 MyHatchStyle = Aspect_HS_VERTICAL;
92 void Aspect_AspectFillArea::SetInteriorStyle (const Aspect_InteriorStyle AStyle) {
94 MyInteriorStyle = AStyle;
98 void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
100 MyInteriorColor = AColor;
104 void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
107 MyBackInteriorColor = color;
111 void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
113 MyEdgeColor = AColor;
117 void Aspect_AspectFillArea::SetEdgeLineType (const Aspect_TypeOfLine AType) {
123 void Aspect_AspectFillArea::SetEdgeWidth (const Standard_Real AWidth) {
126 Aspect_AspectFillAreaDefinitionError::Raise
127 ("Bad value for EdgeLineWidth");
129 MyEdgeWidth = AWidth;
133 void Aspect_AspectFillArea::SetHatchStyle (const Aspect_HatchStyle AStyle) {
135 MyHatchStyle = AStyle;
139 Aspect_HatchStyle Aspect_AspectFillArea::HatchStyle () const {
141 return (MyHatchStyle);
145 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
147 AStyle = MyInteriorStyle;
148 AIntColor = MyInteriorColor;
149 AEdgeColor = MyEdgeColor;
151 AWidth = MyEdgeWidth;
155 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
157 AStyle = MyInteriorStyle;
158 AIntColor = MyInteriorColor;
160 BackIntColor = MyBackInteriorColor;
162 AEdgeColor = MyEdgeColor;
164 AWidth = MyEdgeWidth;