blob: 0f2b7eae2c84f14eebf6644aaa38f22db466fdf1 (
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
95
96
97
98
|
// Copyright: Matra-Datavision 1991
// File: Draw_Segment2D.cxx
// Created: Thu Apr 25 11:25:22 1991
// Author: Arnaud BOUZY
// <adn>
#include <Draw_Segment2D.ixx>
//=======================================================================
//function : Draw_Segment2D
//purpose :
//=======================================================================
Draw_Segment2D::Draw_Segment2D(const gp_Pnt2d& p1,
const gp_Pnt2d& p2,
const Draw_Color& col) :
myFirst(p1),
myLast(p2),
myColor(col)
{
}
//=======================================================================
//function : DrawOn
//purpose :
//=======================================================================
void Draw_Segment2D::DrawOn(Draw_Display& dis)const
{
dis.SetColor(myColor);
dis.Draw(myFirst,myLast);
}
//=======================================================================
//function : First
//purpose :
//=======================================================================
const gp_Pnt2d& Draw_Segment2D::First() const
{
return myFirst;
}
//=======================================================================
//function : First
//purpose :
//=======================================================================
void Draw_Segment2D::First(const gp_Pnt2d& P)
{
myFirst = P;
}
//=======================================================================
//function : Last
//purpose :
//=======================================================================
const gp_Pnt2d& Draw_Segment2D::Last() const
{
return myLast;
}
//=======================================================================
//function : Last
//purpose :
//=======================================================================
void Draw_Segment2D::Last(const gp_Pnt2d& P)
{
myLast = P;
}
//=======================================================================
//function : Whatis
//purpose :
//=======================================================================
void Draw_Segment2D::Whatis(Draw_Interpretor& S) const
{
S << "segment 2d";
}
//=======================================================================
//function : Dump
//purpose :
//=======================================================================
void Draw_Segment2D::Dump(Standard_OStream& S) const
{
S << setw(17) << myFirst.X() << " " << setw(17) << myFirst.Y() << " - "
<< setw(17) << myLast.X() << " " << setw(17) << myLast.Y() << "\n";
}
|