Printing 3D frame

Hi Friends!

I rewritten the TfrxView's DrawBackground method for providing me a custom 3D frame around the visible components of the report. It works perfectly in the designer and in the preview window. But on the printed document it is almost disappear. There is a big difference between the previewed and the printed report components.

For more details see these shots:
- components in the designer
- components in the preview window

So, is there any tricks about printing the report components? As I saw, the printing is done with the inherited Draw methods of the components, that also calls the DrawBackground method.

My code uses the ExtCtrls unit's Frame3D method for achieving this effect. What is wrong? The printer's Canvas doesn't support fully this drawing method?

When I took a screenshot from the preview window and then printed the image, the result were perfect, the 3D frame looked nice.

TIA:Alex :-)

Comments

  • edited 8:18PM
    Problem solved. I realized that the problem was the resolution difference between the screen canvas and the printer canvas. The solution is when IsPrinting is true, then I first draw the frame on a TMetaFileCanvas, because of its device independency. And then draw that canvas onto the printer with the PlayEnhMetaFile API function. It is perfect solution.

    Cheers:Alex :-)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.