Help please.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Help please.

ShinRevolver
Hi there. I would like to ask, where in the code is the part where png, jpeg, svg, etc. files are created? Not the one with void QC_ApplicationWindow::slotFileExport(); Because I want to try and implement if I can export exif or jp2 files.

Much appreciated. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Help please.

dxli
it's handled within QC_ApplicationWindow::slotFileExport().  The actual drawing happens line 3232:

   for (RS_Entity* e=graphic->firstEntity(RS2::ResolveAll);
            e!=NULL; e=graphic->nextEntity(RS2::ResolveAll)) {
        gv.drawEntity(&painter, e);
    }

where painter is RS_PainterQt

ShinRevolver wrote
Hi there. I would like to ask, where in the code is the part where png, jpeg, svg, etc. files are created? Not the one with void QC_ApplicationWindow::slotFileExport(); Because I want to try and implement if I can export exif or jp2 files.

Much appreciated. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Help please.

ShinRevolver
Could you explain how this part works? I'm kinda confused.
Reply | Threaded
Open this post in threaded view
|

Re: Help please.

ShinRevolver
In reply to this post by dxli
I added this bit of code supportedImageFormats.append("jp2"); (together with the similar add svg code at about 3054) to the QC_ApplicationWindow::slotFileExport().

And since it fails to export, what other parts am I still missing? Also, I don't quite understand RS_PainterQt.
Reply | Threaded
Open this post in threaded view
|

Re: Help please.

dxli
RS_PainterQt translate entity drawing actions to supported QPainter() drawing actions.

Read the source code of RS_PainterQt, and you can see how entities are drawn.


On Tue, Feb 11, 2014 at 11:34 AM, ShinRevolver [via LibreCAD] <[hidden email]> wrote:
I added this bit of code supportedImageFormats.append("jp2"); (together with the similar add svg code at about 3054) to the QC_ApplicationWindow::slotFileExport().

And since it fails to export, what other parts am I still missing? Also, I don't quite understand RS_PainterQt.


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Help-please-tp5709539p5709544.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD-dev, click here.
NAML



--
Dongxu Li, Ph.D.
www.librecad.org