Bug 2240

Summary: make it possible to print the topology (to a file)
Product: netanim Reporter: Beestre84
Component: animatorAssignee: John Abraham <john.abraham.in>
Status: NEW ---    
Severity: enhancement CC: ns-bugs
Priority: P5    
Version: unspecified   
Hardware: PC   
OS: Linux   

Description Beestre84 2015-12-03 06:31:18 UTC
Hello,

it would be very useful to be able to print the topology, e.g. when discussing a simulation result in a paper.

I've put the following code, well, _somewhere_ inside netanim:

-----
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName("print.pdf");
QPainter painter;
painter.begin(&printer);
AnimatorScene::getInstance ()->render(&painter);
painter.end();
-----

Obviously this is just a hack, but it yields a very nice vector graphic of the current scene. A clean solution would make a great feature and should not be too difficult to achieve.