Hello Tomas,
> The printer DC is needed to achieve a WYSIWYG layout. If you remove the
> initialization, the document will be laid out using the screen font
> metrics, and when you print it, the printed layout will be significantly
> different, as it used to be in the old days. (Not sure what made you
> think this value is not used, as it is used immediately on the next
> line, and throughout the class, as well as in the derived USP class).
You are complete right.
> Some time could be saved by having a static member s_defaultPrinterDC
> which would be initialised only once and used to initialize the
Yes, that makes sense. I will do that for the next version of the patch.
> m_printHDC member (btw, any idea why retrieving the default printer is
> taking so long ?).
CreateDC is very slow in this context. See the attached profiler graphic for
details on the UT_GetDefaultPrinterDC call.
Jordi,
-- Jordi Mas i HernĂ ndez, HomePage http://www.softcatala.org/~jmas/ Bloc personal http://www.softcatala.org/~jmas/bloc/ Planeta SoftcatalĂ : http://www.softcatala.org/planet/
This archive was generated by hypermail 2.1.8 : Thu May 17 2007 - 17:18:08 CEST