How douse QPainter, QPaintDevice and QPaintEngine work
-
I tried to find out how the QPaintDevie works and where the actual file is created, for example where it writes the SVG tags and so. After a while, I saw that it had something to do with QPaintEngine, but I wasn't really able to figure out how it works. I even tried to find the "<line " tag in the SVG class, but this was nowhere to be seen, which kind of confused me.
As for why I wanted to know how it works, I wanted to know how hard it would be to implement a new Paint device, for example a Latex TikZ one.
-
I tried to find out how the QPaintDevie works and where the actual file is created, for example where it writes the SVG tags and so. After a while, I saw that it had something to do with QPaintEngine, but I wasn't really able to figure out how it works. I even tried to find the "<line " tag in the SVG class, but this was nowhere to be seen, which kind of confused me.
As for why I wanted to know how it works, I wanted to know how hard it would be to implement a new Paint device, for example a Latex TikZ one.
@TobiasFalk42 If you want to create a SVG image then take a look at this example: https://doc.qt.io/qt-6/qtsvg-svggenerator-example.html
-
I do not want to create a SVG image I want to export my QPaint as Latex TikZ(link text image/diagram.
To do that I was thinking to create a QPaintDevice simelar to the SVG one but I am not abke to understand how the QPaintDevice and all works internaly. -
The paint system documentation might be what you're looking for.
-
@jeremy_k, yes, this helped a lot. I also saw that the SVG does not use the <line tag, but the <path tag for drawing a line.