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
| // Lien.cpp: implementation of the Lien class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "psc.h"
#include "Lien.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Lien::Lien()
{
}
Lien::Lien(CString n, Lieu* d, Lieu* a)
{
nom = n;
depart = d;
arrivee = a;
pen = new CPen(PS_SOLID,2,RGB(255,0,0));
}
Lien::~Lien()
{
delete pen;
}
void Lien::dessiner(CPaintDC *dc)
{
dc->SelectObject(pen);
dc->MoveTo(depart->getx(),depart->gety());
dc->LineTo(arrivee->getx(),arrivee->gety());
} |
Partager