[Kde-extra-gear] kgraphviewer: export to image: actual command line behind the scenes
Kleag
kleag at free.fr
Thu Jun 18 21:42:00 CEST 2009
Hello,
In fact, this is not handled by dot. I just ask the scene to render itself on
an image, this way:
QPixmap pix(m_canvas->sceneRect().size().toSize());
QPainter p(&pix);
m_canvas->render( &p );
pix.save(fn,"PNG");
So, you get the QGraphicsView antialiasing.
Regards,
Gaël
Le jeudi 18 juin 2009 00:30:22 Kay Kay, vous avez écrit :
> I am using kgraphviewer to view a .dot and using "export to image"
> functionality that saves the graph as png.
> The output quality is very nice with the anti-aliasing close to being
> perfect for the text values of the nodes.
>
> I tried the same in the command-line ( eventually for automation) using
> the dot command as - "dot -Tpng <input file> -o output.png" . This did
> not give the same result as the previous "export" command.
> I am just curious what other extra options that kgraphviewer had invoked
> for the export functionality ( especially with anti aliasing).
>
> Thanks for the help.
>
> _______________________________________________
> Kde-extra-gear mailing list
> Kde-extra-gear at kde.org
> https://mail.kde.org/mailman/listinfo/kde-extra-gear
--
KsirK - a world domination strategy game
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK
KGraphViewer - a GraphViz dot graphs viewer
http://extragear.kde.org/apps/kgraphviewer
More information about the Kde-extra-gear
mailing list