The best solution is the one in your previous paragraph: do the drawing
directly into the printDc.
One you draw lines and text into a DC, they cease to be lines and text
and become nothing but pixels. Now, the typical monitor today displays
about 96 pixels per inch. The typical printer has about 600 pixels per
inch, and many can do 1200. When you use Blit to copy from a 96 dpi
screen DC to a 600 dpi print DC, each of the screen pixels will become
an ugly 6x6 block of pixels on the printer. Blit cannot tell that the
pixel was part of the letter E, and that it could be drawn more smoothly.
The right thing to do is to have your drawing done in a separate
function that accepts a generic DC. Have it use the DC parameters to
figure out the proper scaling. Then call it with a screen DC for
drawing on the screen, and with a printer DC for printing.
ยทยทยท
On Wed, 04 Jan 2006 17:33:38 +0100, Michele Petrazzo <michele.petrazzo@unipex.it> wrote:
Hello list,
I have a problem with a very low quality that wxDc.Blit produce when I
copy from a dc (where I draw some text and lines) to another.The destination dc (where I see the low quality) is a printDc that come
from a wx.Printout class (the same found on the demo, with the same
algorithm for calculate the scale) and the source dc is a my internal dc
where, after some work, I draw with objects (text, lines, ...)I see (in a simple example create) that if I draw directly my geometric
shapes into the printDc, the quality are perfect, so I think that wx
(python or widgets) do something "magic" before the real shape draw
(like calculate the real dimensions before draw)So now I'm asking what are the better solution for do my work...
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.