开发者

Qt and exporting vector images

开发者 https://www.devze.com 2023-04-05 01:22 出处:网络
I am using QPainter to draw some graphs on the screen and save these graphs as a raster images. Is it possible to use the same logic I used for rasterizing these graphs to have them exported to vecto

I am using QPainter to draw some graphs on the screen and save these graphs as a raster images.

Is it possible to use the same logic I used for rasterizing these graphs to have them exported to vector images that I can 开发者_运维问答use in a PDF?


You can use a QSvgGenerator as a "backend" to your QPainter, and you'll get an SVG document out of it. (The documentation has an example for how to do that.)

I don't know if you can use that directly in PDFs, but there are converters out there if you need a different vector graphics format.

0

精彩评论

暂无评论...
验证码 换一张
取 消