delegate draw to persons
This commit is contained in:
@@ -7,11 +7,6 @@
|
||||
using std::cout;
|
||||
|
||||
|
||||
Tree::Tree()
|
||||
: treeName("Unnamed")
|
||||
, numPeople(0)
|
||||
{}
|
||||
|
||||
Tree Tree::operator+ (const Tree& other)//
|
||||
{
|
||||
Tree result(treeName + other.treeName); //The tree resulting from the addition
|
||||
@@ -442,18 +437,21 @@ void Tree::removeRelation(const unsigned firstId, const unsigned secondId)
|
||||
|
||||
void Tree::draw() const
|
||||
{
|
||||
WINDOW* father = people[0].createPad();
|
||||
WINDOW* mother = people[1].createPad();
|
||||
/* WINDOW* father = people[0].createPad(); */
|
||||
/* WINDOW* mother = people[1].createPad(); */
|
||||
|
||||
U16 fw = getmaxx(father); /* return size, not coords */
|
||||
U16 fh = getmaxy(father);
|
||||
U16 mw = getmaxx(mother);
|
||||
U16 mh = getmaxy(mother);
|
||||
/* U16 fw = getmaxx(father); /\* return size, not coords *\/ */
|
||||
/* U16 fh = getmaxy(father); */
|
||||
/* U16 mw = getmaxx(mother); */
|
||||
/* U16 mh = getmaxy(mother); */
|
||||
|
||||
U16 drawX = (COLS - fw - mw) / 2;
|
||||
pnoutrefresh(father, 0, 0,
|
||||
1, drawX,
|
||||
1 +fh-1, drawX + fw-1);
|
||||
/* U16 drawX = (COLS - fw - mw) / 2; */
|
||||
/* pnoutrefresh(father, 0, 0, */
|
||||
/* 1, drawX, */
|
||||
/* 1 +fh-1, drawX + fw-1); */
|
||||
|
||||
|
||||
people[0].draw(0, 0);
|
||||
|
||||
/* pnoutrefresh(mother, 0, 0, 1, d */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user