blob: ce8c57bb4d7fb368a6786c1857fd27c94e5dcf0a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
// File Aspect_AspectLine.cxx
// Created Mars 1992
// Author NW,JPB,CAL
//-Copyright MatraDatavision 1991,1992
//-Version
//-Design Declaration des variables specifiques au contexte
// de trace de lignes
//-Warning Un contexte de trace de ligne est defini par :
// - la couleur
// - le type de trait
// - l'epaisseur
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_AspectLine.ixx>
//-Aliases
//-Global data definitions
// -- la couleur
// MyColor : Color;
// -- le type de trait
// MyType : TypeOfLine;
// -- l'epaisseur
// MyWidth : Standard_Real;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_AspectLine::Aspect_AspectLine () {
MyColor = Quantity_NOC_YELLOW;
MyType = Aspect_TOL_SOLID;
MyWidth = 1.0;
}
Aspect_AspectLine::Aspect_AspectLine (const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth) {
if (AWidth <= 0.0)
Aspect_AspectLineDefinitionError::Raise
("Bad value for LineWidth");
MyColor = AColor;
MyType = AType;
MyWidth = AWidth;
}
void Aspect_AspectLine::SetColor (const Quantity_Color& AColor) {
MyColor = AColor;
}
void Aspect_AspectLine::SetType (const Aspect_TypeOfLine AType) {
MyType = AType;
}
void Aspect_AspectLine::SetWidth (const Standard_Real AWidth) {
if (AWidth <= 0.0)
Aspect_AspectLineDefinitionError::Raise
("Bad value for LineWidth");
MyWidth = AWidth;
}
void Aspect_AspectLine::Values (Quantity_Color& AColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const {
AColor = MyColor;
AType = MyType;
AWidth = MyWidth;
}
|