Changeset 209 in PSPA


Ignore:
Timestamp:
Dec 19, 2012, 11:46:34 AM (12 years ago)
Author:
garnier
Message:

repation du bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc

    r208 r209  
    725725
    726726#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éé");
    735734#endif
    736735
     
    786785  // Add the curves
    787786  WDataSeries s(1, CurveSeries, Y1Axis);
    788      chart->addSeries(s);
     787  chart->addSeries(s);
    789788
    790789  chart->resize(300, 300); // WPaintedWidget must be given explicit size
    791790
    792791#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éé");
    801800#endif
    802801}
Note: See TracChangeset for help on using the changeset viewer.