next up previous contents
Next: Generating Obstacle Arrays: Up: Adding Graphics Capability to Previous: ForwardPathPrint():

The New Graph Path Draw Method:


Graph& Graph::drawpath(Drawable D,GedgePtrBag& Path)
{
  GnodePtrBagIter nit(nodes());
  if(nit){
    for( ; nit; ++nit){
      nit()->C->draw(D);
      }
    }
  
  for(GedgePtrBagIter eit(Path);eit;++eit){
     //redraw edges for supplied path
     eit()->E->draw(D);
    }
  return *this;     
}



Jim Peterson
1999-04-13