>When I resize the image, i.e. zoom in or zoom out, the text looks like >CRAP !
>I had a look at how QR does this, and basically it saves the image canvas >to a metafile in memory then loads it back in, but when I tried this, I kept >getting an invalid metafile when I either saved to stream or saved to file.
 When you write to image you are writing into a bitmap. Zooming is done by
Stretchblt so with text stored as pixels, you get UGLY. TT fonts will work IF
you zoom by: StretchBlt the non-text part of your bitmap, scale your font and redraw the text again on top of the bitmap. This is ugly and hard to scale
fonts so they "register" properly. The metafile approach really is the way to
go - it keeps all vectors as vectors. I have not mastered how to store metafiles in a streams, (seems to be basic lack of API support for this) but never had any problem with write/read from file. Got some code for us to look at? Mine is pretty well based on theTeechart code which does same approach.

----------------------------------------------------------
Phil Scadden, Institute of Geological and Nuclear Sciences
PO Box 30368, Lower Hutt, New Zealand
Ph +64 4 5704821, fax +64 4 5704603
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz


Reply via email to