Page 1 of 1

TRVReportHelper: DrawPage vs DrawPreview

Posted: Wed Sep 20, 2006 7:52 pm
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.

Posted: Thu Sep 21, 2006 8:50 am
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.