Skip to content

Commit

Permalink
WT-9721: properly re-added pdfImageWrite.cpp
Browse files Browse the repository at this point in the history
Previously, we restored the src.xml, but didn't actually restore
the cpp file, so subsequent makexml calls would throw it away again.
  • Loading branch information
RockinRoel committed Jan 19, 2023
1 parent 757eeb0 commit b3d2d74
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
19 changes: 17 additions & 2 deletions examples/widgetgallery/approot/src.xml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions examples/widgetgallery/examples/pdfImageWrite.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <Wt/Chart/WCartesianChart.h>
#include <Wt/WPdfImage.h>

auto chart = std::make_unique<Chart::WCartesianChart>();

WPdfImage pdfImage("4cm", "3cm");
{
WPainter p(&pdfImage);
chart->paint(p);
}
std::ofstream f("chart.pdf", std::ios::out | std::ios::binary);
pdfImage.write(f);

0 comments on commit b3d2d74

Please sign in to comment.