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