Add a 'Stamp' widget.

Place one or multiple stamps on scanned pages in defined locations.

A stamp is understood here as
 - a transparent text in a transparent frame with no borders
 - an opaque text on an opaque background with no borders.

Stamp parameters:
 - text
 - font
 - foreground colour
 - background colour
 - angle of rotation
 - transparency.

Locations:
 - centre
 - cardinal directions
 - inter-cardinal directions.
This commit is contained in:
Saleem Edah-Tally
2025-07-01 22:38:07 +02:00
parent c2c792dd3d
commit a2045aa1f6
38 changed files with 3376 additions and 71 deletions

View File

@@ -12,13 +12,18 @@
#include <string>
#include <map>
#include <vector>
#include <podofo/podofo.h>
#include <wx/wx.h>
struct StampDescriptor;
/**
* Create a PDF document, append or insert pages from raw scanned files.\n
* Each image is a full page scan; it is scaled in the PDF document to the full
* page dimensions.\n
* Account for page size.
* Account for page size.\n
* Optionally, a stamp image may be blended on the page.
*/
class PixelToPdfWriter
{
@@ -27,6 +32,7 @@ public:
PixelToPdfWriter();
bool AddPageAt(const std::string& pixelFile, uint width, uint height, uint index,
std::vector<StampDescriptor*> * descriptors,
PoDoFo::PdfPageSize pageSize = PoDoFo::PdfPageSize::A4,
PoDoFo::PdfColorSpace = PoDoFo::PdfColorSpace::DeviceRGB /*Unused*/);
void Save(const std::string& pdfFile);