0024023: Revamp the OCCT Handle -- ambiguity
[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
7fd59977 55//-Constructors
56
57//-Destructors
58
59//-Methods, in order
60
61Aspect_AspectFillArea::Aspect_AspectFillArea () {
62
63 MyInteriorStyle = Aspect_IS_EMPTY;
64 MyInteriorColor = Quantity_NOC_CYAN1;
7fd59977 65 MyBackInteriorColor = Quantity_NOC_CYAN1;
7fd59977 66 MyEdgeColor = Quantity_NOC_WHITE;
67 MyEdgeType = Aspect_TOL_SOLID;
68 MyEdgeWidth = 1.0;
69 MyHatchStyle = Aspect_HS_VERTICAL;
70
71}
72
73Aspect_AspectFillArea::Aspect_AspectFillArea (const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth) {
74
75 if (EdgeLineWidth <= 0.0)
76 Aspect_AspectFillAreaDefinitionError::Raise
77 ("Bad value for EdgeLineWidth");
78
79 MyInteriorStyle = InteriorStyle;
80 MyInteriorColor = InteriorColor;
81 MyEdgeColor = EdgeColor;
82 MyEdgeType = EdgeLineType;
83 MyEdgeWidth = EdgeLineWidth;
84 MyHatchStyle = Aspect_HS_VERTICAL;
85
86}
87
88void Aspect_AspectFillArea::SetInteriorStyle (const Aspect_InteriorStyle AStyle) {
89
90 MyInteriorStyle = AStyle;
91
92}
93
94void Aspect_AspectFillArea::SetInteriorColor (const Quantity_Color& AColor) {
95
96 MyInteriorColor = AColor;
97
98}
99
100void Aspect_AspectFillArea::SetBackInteriorColor( const Quantity_Color& color )
101{
7fd59977 102 MyBackInteriorColor = color;
7fd59977 103}
104
105void Aspect_AspectFillArea::SetEdgeColor (const Quantity_Color& AColor) {
106
107 MyEdgeColor = AColor;
108
109}
110
111void Aspect_AspectFillArea::SetEdgeLineType (const Aspect_TypeOfLine AType) {
112
113 MyEdgeType = AType;
114
115}
116
117void Aspect_AspectFillArea::SetEdgeWidth (const Standard_Real AWidth) {
118
119 if (AWidth <= 0.0)
120 Aspect_AspectFillAreaDefinitionError::Raise
121 ("Bad value for EdgeLineWidth");
122
123 MyEdgeWidth = AWidth;
124
125}
126
127void Aspect_AspectFillArea::SetHatchStyle (const Aspect_HatchStyle AStyle) {
128
129 MyHatchStyle = AStyle;
130
131}
132
133Aspect_HatchStyle Aspect_AspectFillArea::HatchStyle () const {
134
135 return (MyHatchStyle);
136
137}
138
139void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
140
141 AStyle = MyInteriorStyle;
142 AIntColor = MyInteriorColor;
143 AEdgeColor = MyEdgeColor;
144 AType = MyEdgeType;
145 AWidth = MyEdgeWidth;
146
147}
148
149void Aspect_AspectFillArea::Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
150
151 AStyle = MyInteriorStyle;
152 AIntColor = MyInteriorColor;
7fd59977 153 BackIntColor = MyBackInteriorColor;
7fd59977 154 AEdgeColor = MyEdgeColor;
155 AType = MyEdgeType;
156 AWidth = MyEdgeWidth;
157
158}