LibreCAD
›
LibreCAD-dev
Search
everywhere
only in this topic
Advanced Search
PNG files
‹
Previous Topic
Next Topic
›
Classic
List
Threaded
♦
♦
Locked
10 messages
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
PNG files
Hi,
Has anyone here used pngwriter? Its a library that creates a .png file. I trying to add it as a library to see if I can save any drawing as a .png file. Its mainly a school project. Any tips? I'm new here. Thanks.
sp1der
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
LibreCAD can already save a drawing to a .png format, is this no good for you?
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
Oh. Snap. Scratch that idea. Know any simple ones that I can implement? I would greatly appreciate it.
dxli
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
It may work, to create your own painter class similar to RS_Painter.
You need to replace all drawing methods there (RS_Painter) to use pngwriter.
It sounds quite lots of work.
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
I'll look into it. Thanks.
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
In reply to
this post
by dxli
Can you tell me where the code for the export of features(to png, to jpeg, etc.) is located? I can't seem to locate it. Thanks.
dxli
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
void QC_ApplicationWindow::slotFileExport() ;
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
Thanks. This is in terms of the UI, if I'm not mistaken. Where do you put the code in order for it to create the file(i.e png, jpeg, etc.)?
dxli
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
the code to generate an image file in line 3249,
if (iio.write(img)) {
ret = true;
}
ShinRevolver
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: PNG files
Thanks.
Free forum by Nabble
Edit this page