I’ve found an easy looking tutorial how to create a pdf in c++:
Here’s a piece of code which draws an image on page:
auto stream = MakeObject<IO::MemoryStream>(); SharedPtr<Bitmap> bitmap = MakeObject<Bitmap>(200, 200); SharedPtr<Graphics> graphics = Graphics::FromImage(bitmap); graphics->Clear(System::Drawing::Color::get_Yellow()); graphics->FillRectangle(Brushes::get_Blue(), System::Drawing::Rectangle(0, 0, 200, 100)); bitmap->Save(stream, Imaging::ImageFormat::get_Bmp());
In my game I have an image drawn by user, stored in unsigned char* array, also accessible by Sprite object.
Is it possible to convert this data array to “Bitmap” or “Graphics” so I’d be able to create PDF from user drawn image?