TRVReportHelper: DrawPage vs DrawPreview

General TRichView support forum. Please post your questions here
Post Reply
Pent
Posts: 8
Joined: Wed Sep 20, 2006 6:30 am

TRVReportHelper: DrawPage vs DrawPreview

Post by Pent »

Is there any difference in rendering algorithms between these 2 methods?
Which one is faster?
Which provides better quality?

Let's say I have some document (take 1 page for simplicity) loaded into RVReportHelper1.
I call

Code: Select all

RVReportHelper1.Init(Canvas,w);
RVReportHelper1.FormatNextPage(h);
where Canvas is some low-resolution (onscreen) TCanvas. Now I want to be able to output RVReportHelper1 onto a printer, as well as onto some other canvas (with scaling).

I guess DrawPreview is pretty much Ok for the latter, but is it good to use DrawPreview for printing instead of DrawPage? DrawPreview method seems more handy for me, because I can control scaling really easily.

Is there a reason why I should not use DrawPreview instead of DrawPage everywhere?

Thank you.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TRVReportHelper and TRVPrint are inherited from the same ancestor class. Their drawing methods are the same.
In preview mode, some correction is performed on text. It makes sense if the document is formatted on canvas with different resolution.

DrawPage can be used in preview mode too, it has the Preview parameter.
Preview mode must not be used when drawing on printer canvas (printing), because it also uses simplified method of drwing bitmaps.
Post Reply