void Selection::GetBox (Coord& l, Coord& b, Coord& r, Coord& t) { Iterator i; Graphic* gr; BoxObj btotal, bgraphic; First(i); gr = GetView(i)->GetGraphic(); gr->GetBox(btotal); for (Next(i); !Done(i); Next(i)) { gr = GetView(i)->GetGraphic(); gr->GetBox(bgraphic); btotal = btotal + bgraphic; } l = btotal._left; b = btotal._bottom; r = btotal._right; t = btotal._top; }
Graphic* Picture::LastGraphicWithin (BoxObj& userb) { Iterator i; BoxObj b; for (Last(i); !Done(i); Prev(i)) { Graphic* subgr = GetGraphic(i); subgr->GetBox(b); if (b.Within(userb)) { return subgr; } } return nil; }