2 // File Aspect_AspectFillArea.cxx
5 // Modified: 15/01/98 ; FMN : Ajout Hidden Line
7 //-Copyright MatraDatavision 1991,1992
11 //-Design Declaration des variables specifiques au contexte
12 // de trace des facettes
14 //-Warning Un contexte de trace de facette est defini par :
15 // - le style de l'interieur de la facette
16 // - le style du bord de la facette
26 #include <Aspect_AspectFillArea.ixx>
30 //-Global data definitions
33 // MyInteriorStyle : InteriorStyle;
34 // MyInteriorColor : Color;
37 // MyEdgeColor : Color;
38 // MyEdgeType : TypeOfLine;
39 // MyEdgeWidth : Standard_Real;
42 // MyHatchStyle : HatchStyle;
45 #define OCC1174 // SAV : 08/01/03 Added back face interior color
53 Aspect_AspectFillArea::Aspect_AspectFillArea () {
55 MyInteriorStyle = Aspect_IS_EMPTY;
56 MyInteriorColor = Quantity_NOC_CYAN1;
58 MyBackInteriorColor = Quantity_NOC_CYAN1;
60 MyEdgeColor = Quantity_NOC_WHITE;
61 MyEdgeType = Aspect_TOL_SOLID;
63 MyHatchStyle = Aspect_HS_VERTICAL;
67 Aspect_AspectFillArea::Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth) {
69 if (EdgeLineWidth <= 0.0)
70 Aspect_AspectFillAreaDefinitionError::Raise
71 ("Bad value for EdgeLineWidth");
73 MyInteriorStyle = InteriorStyle;
74 MyInteriorColor = InteriorColor;
75 MyEdgeColor = EdgeColor;
76 MyEdgeType = EdgeLineType;
77 MyEdgeWidth = EdgeLineWidth;
78 MyHatchStyle = Aspect_HS_VERTICAL;
82 void Aspect_AspectFillArea::SetInteriorStyle (const Aspect_InteriorStyle AStyle) {
84 MyInteriorStyle = AStyle;
88 void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
90 MyInteriorColor = AColor;
94 void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
97 MyBackInteriorColor = color;
101 void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
103 MyEdgeColor = AColor;
107 void Aspect_AspectFillArea::SetEdgeLineType (const Aspect_TypeOfLine AType) {
113 void Aspect_AspectFillArea::SetEdgeWidth (const Standard_Real AWidth) {
116 Aspect_AspectFillAreaDefinitionError::Raise
117 ("Bad value for EdgeLineWidth");
119 MyEdgeWidth = AWidth;
123 void Aspect_AspectFillArea::SetHatchStyle (const Aspect_HatchStyle AStyle) {
125 MyHatchStyle = AStyle;
129 Aspect_HatchStyle Aspect_AspectFillArea::HatchStyle () const {
131 return (MyHatchStyle);
135 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
137 AStyle = MyInteriorStyle;
138 AIntColor = MyInteriorColor;
139 AEdgeColor = MyEdgeColor;
141 AWidth = MyEdgeWidth;
145 void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
147 AStyle = MyInteriorStyle;
148 AIntColor = MyInteriorColor;
150 BackIntColor = MyBackInteriorColor;
152 AEdgeColor = MyEdgeColor;
154 AWidth = MyEdgeWidth;