I have a project created in C++Builder XE4. This uses the VCL 32 bit platform. I am working with the Tdirect2DCanvas. This job is to add printing to a project. This job can be done in any version of C++Builder that supports Tdirect2DCanvas.
The attached sample project which should be below, draws some transparent lines using the opacity setting, along with solid lines, circles, and text. I need to take the drawing on the Tdirect2DCanvas and print it. The 8 points below are required to complete the job.
1 Add code to draw the screen to a printer canvas as a fit-to-page print. This means the draw must be adjusted in the X axis and Y axis so it fills one printed page.
2 The fit-to-page adjustment must work on different paper sizes, Portrait, Landscape or other.
3 The printing must have no pixelation. The fonts, circles, angles lines and so on, must be smooth. This is usually accomplished by drawing to a printer canvas rather than printing a screen shot.
4 Objects that are partly on the screen, and partly off the screen, such as text, circles, lines and so on should print the part that is seen on the screen.
5 Transparent objects that use the opacity setting should print as transparent objects.
6 Printing in color should work.
7 A print preview form which displays the print before printing is started must be added.
8) A print settings button and dialog should be added.