42cf5bc1 |
1 | // Created on: 1991-11-04 |
2 | // Created by: NW,JPB,CAL |
3 | // Copyright (c) 1991-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _Aspect_AspectFillArea_HeaderFile |
18 | #define _Aspect_AspectFillArea_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Aspect_InteriorStyle.hxx> |
24 | #include <Quantity_Color.hxx> |
25 | #include <Aspect_TypeOfLine.hxx> |
26 | #include <Standard_Real.hxx> |
27 | #include <Aspect_HatchStyle.hxx> |
28 | #include <MMgt_TShared.hxx> |
29 | class Aspect_AspectFillAreaDefinitionError; |
30 | class Quantity_Color; |
31 | |
32 | |
33 | class Aspect_AspectFillArea; |
34 | DEFINE_STANDARD_HANDLE(Aspect_AspectFillArea, MMgt_TShared) |
35 | |
36 | //! Group of attributes for the FACE primitives. |
37 | //! The attributes are: |
38 | //! * type of interior |
39 | //! * type of hatch |
40 | //! * interior colour |
41 | //! * border colour |
42 | //! * type of border |
43 | //! * thickness of border |
44 | //! when the value of the group is modified, all graphic |
45 | //! objects using this group are modified. |
46 | class Aspect_AspectFillArea : public MMgt_TShared |
47 | { |
48 | |
49 | public: |
50 | |
51 | |
52 | //! Modifies the colour of the edge of the face |
53 | Standard_EXPORT void SetEdgeColor (const Quantity_Color& AColor); |
54 | |
55 | //! Modifies the edge line type |
56 | Standard_EXPORT void SetEdgeLineType (const Aspect_TypeOfLine AType); |
57 | |
58 | //! Modifies the edge thickness |
59 | //! |
60 | //! Category: Methods to modify the class definition |
61 | //! |
62 | //! Warning: Raises AspectFillAreaDefinitionError if the |
63 | //! width is a negative value. |
64 | Standard_EXPORT void SetEdgeWidth (const Standard_Real AWidth); |
65 | |
66 | //! Modifies the hatch type used when InteriorStyle |
67 | //! is IS_HATCH |
68 | Standard_EXPORT void SetHatchStyle (const Aspect_HatchStyle AStyle); |
69 | |
70 | //! Modifies the colour of the interior of the face |
71 | Standard_EXPORT void SetInteriorColor (const Quantity_Color& AColor); |
72 | |
73 | //! Modifies the colour of the interior of the back face |
74 | Standard_EXPORT void SetBackInteriorColor (const Quantity_Color& color); |
75 | |
76 | //! Modifies the interior type used for rendering |
77 | //! |
78 | //! InteriorStyle : IS_EMPTY no interior |
79 | //! IS_HOLLOW display the boundaries of the surface |
80 | //! IS_HATCH display hatching |
81 | //! IS_SOLID display interior entirely filled |
82 | Standard_EXPORT void SetInteriorStyle (const Aspect_InteriorStyle AStyle); |
83 | |
84 | //! Returns the hatch type used when InteriorStyle |
85 | //! is IS_HATCH |
86 | Standard_EXPORT Aspect_HatchStyle HatchStyle() const; |
87 | |
88 | Standard_EXPORT void Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const; |
89 | |
90 | //! Returns the current values of the <me> group. |
91 | Standard_EXPORT void Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const; |
92 | |
93 | |
94 | |
95 | |
96 | DEFINE_STANDARD_RTTI(Aspect_AspectFillArea,MMgt_TShared) |
97 | |
98 | protected: |
99 | |
100 | |
101 | //! Initialise the constructor |
102 | //! of Graphic3d_AspectFillArea3d. |
103 | //! |
104 | //! default values : |
105 | //! |
106 | //! InteriorStyle = Aspect_IS_EMPTY; |
107 | //! InteriorColor = Quantity_NOC_CYAN1; |
108 | //! EdgeColor = Quantity_NOC_WHITE; |
109 | //! EdgeType = Aspect_TOL_SOLID; |
110 | //! EdgeWidth = 1.0; |
111 | //! HatchStyle = Aspect_HS_VERTICAL; |
112 | Standard_EXPORT Aspect_AspectFillArea(); |
113 | |
114 | //! Initialise the values for the constructor of |
115 | //! Graphic3d_AspectFillArea3d. |
116 | //! |
117 | //! InteriorStyle : |
118 | //! IS_EMPTY no interior. |
119 | //! IS_HOLLOW display the boundaries of the surface. |
120 | //! IS_HATCH display hatched with a hatch style. |
121 | //! IS_SOLID display the interior entirely filled. |
122 | //! |
123 | //! EdgeLineType : |
124 | //! TOL_SOLID continuous |
125 | //! TOL_DASH dashed |
126 | //! TOL_DOT dotted |
127 | //! TOL_DOTDASH mixed |
128 | //! |
129 | //! default values : |
130 | //! HatchStyle = Aspect_HS_VERTICAL; |
131 | //! |
132 | //! Warning: Raises AspectFillAreaDefinitionError if the |
133 | //! width is a negative value. |
134 | Standard_EXPORT Aspect_AspectFillArea(const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth); |
135 | |
136 | |
137 | |
138 | private: |
139 | |
140 | |
141 | Aspect_InteriorStyle MyInteriorStyle; |
142 | Quantity_Color MyInteriorColor; |
143 | Quantity_Color MyBackInteriorColor; |
144 | Quantity_Color MyEdgeColor; |
145 | Aspect_TypeOfLine MyEdgeType; |
146 | Standard_Real MyEdgeWidth; |
147 | Aspect_HatchStyle MyHatchStyle; |
148 | |
149 | |
150 | }; |
151 | |
152 | |
153 | |
154 | |
155 | |
156 | |
157 | |
158 | #endif // _Aspect_AspectFillArea_HeaderFile |