Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ScatterDraw & ScatterCtrl » PieCtrl and GetImage (How to use correctly GetImage() with PieCtrl to obtain a image of the chart)
Re: PieCtrl and GetImage [message #49127 is a reply to message #49093] Thu, 21 December 2017 12:25 Go to previous messageGo to previous message
Diego22 is currently offline  Diego22
Messages: 10
Registered: November 2016
Location: Zaragoza
Promising Member
Quote:
In my opinion your problem might be the result of lack appropriate inclusion before including LAYOUTFILE. It should be done something like that:
#include <Scatter/Pie.h> // This include doesn't exist - you need to find appropriate file or wait until Koldo fix PieTest.
#include <Report/Report.h>
#include <PdfDraw/PdfDraw.h>

#define LAYOUTFILE <PieTest/PieTest.lay>
#include <CtrlCore/lay.h>


I`ve already included those includes. Maybe a correct Pie.h can help me.

Quote:
Please Diego: Could you confirm that Examples\ScatterCtrl_Demo compiles and runs perfectly?


ScatterCtrl compiles and runs correctly. But in Pie Tab, the functions about copy, print and png / jpg, are showing a error message.

Quote:

To include PieCtrl in your package you would need to include ScatterCtrl package and include
#include <ScatterCtrl/ScatterCtrl.h>
#include <ScatterCtrl/PieCtrl.h>

Following Diego answer I understand that layout editor shows the PieCtrl. This way I can imagine ScatterCtrl package is really well loaded.


Also, I had included those includes, layout editor shows the PieCtrl in context menu and the Pie picture at widget.

Quote:
Diego please include this to see if you get the image. Just in case you may comment out everything but the AddCategory() (like in ScatterCtrl_Demo):
imgCostes = grafCostes.GetImage(); 
PNGEncoder encoder;
encoder.SaveFile("Any folder\\myfile.png", imgCostes);


I added that code yesterday but I still can't get the image.
When I get home, I'll try to create a new and simply test of the Pie, so I'll see if the problem is not my code.
 
Read Message icon9.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dynamic example - 100% CPU core load
Next Topic: ScatterDraw overhaul. Please review
Goto Forum:
  


Current Time: Tue May 07 09:52:47 CEST 2024

Total time taken to generate the page: 0.02400 seconds