Login  Register

Re: How to use drawEntity function API ? Tough problems

Posted by dxli on Jan 21, 2013; 10:34pm
URL: https://forum.librecad.org/How-to-use-drawEntity-function-API-Tough-problems-tp5707424p5707474.html

Hi,

If you are still wondering:

RS_Painter is only an abstract class, and you actually need RS_PainterQt( QPaintDevice* pd) derived from QPainter and RS_Painter.

For example, you can draw to a pixmap by something like:

QPixmap pixmap(1920, 1080);
RS_PainterQt painter(&pixmap);

gv->drawEntity(&painter, e);