Bug 2240 - make it possible to print the topology (to a file)
make it possible to print the topology (to a file)
Status: NEW
Product: netanim
Classification: Unclassified
Component: animator
unspecified
PC Linux
: P5 enhancement
Assigned To: John Abraham
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-03 06:31 EST by Beestre84
Modified: 2015-12-03 06:31 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beestre84 2015-12-03 06:31:18 EST
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.