Changeset 209 in PSPA
- Timestamp:
- Dec 19, 2012, 11:46:34 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc
r208 r209 725 725 726 726 #ifdef HAS_IMAGEMAGIC 727 Wt::WPdfImage pdfImage("30cm", "30cm"); 728 729 Wt::WPainter p(&pdfImage); 730 chart->paint(p); 731 732 std::ofstream f("chart.pdf", std::ios::out | std::ios::binary); 733 pdfImage.write(f); 734 addConsoleMessage("Le fichier <a href='chart.pdf'>chart.pdf</a> a été créé"); 727 Wt::WRasterImage pngImage("png", 300, 300); 728 Wt::WPainter p(&pngImage); 729 chart->paint(p); 730 std::ofstream f("chart.png", std::ios::out | std::ios::binary); 731 pngImage.write(f); 732 new WText("<a href='chart.png'>chart.png</a>",toto); 733 addConsoleMessage("Le fichier chart.png a été créé"); 735 734 #endif 736 735 … … 786 785 // Add the curves 787 786 WDataSeries s(1, CurveSeries, Y1Axis); 788 787 chart->addSeries(s); 789 788 790 789 chart->resize(300, 300); // WPaintedWidget must be given explicit size 791 790 792 791 #ifdef HAS_IMAGEMAGIC 793 Wt::WPdfImage pdfImage("30cm", "30cm");794 795 Wt::WPainter p(&pdfImage);796 chart->paint(p);797 798 std::ofstream f("chart.pdf", std::ios::out | std::ios::binary); 799 pdfImage.write(f);800 addConsoleMessage("Le fichier <a href='chart.pdf'>chart.pdf</a>a été créé");792 Wt::WRasterImage pngImage("png", 300, 300); 793 Wt::WPainter p(&pngImage); 794 chart->paint(p); 795 std::ofstream f("chart.png", std::ios::out | std::ios::binary); 796 pngImage.write(f); 797 798 new WText("<a href='chart.png'>chart.png</a>",toto); 799 addConsoleMessage("Le fichier chart.png a été créé"); 801 800 #endif 802 801 }
Note: See TracChangeset
for help on using the changeset viewer.