1

Hello I need to integrate formatted text into an older application written in Delphi where it would be rendered into the canvas (GDI - yes prehistoric technology, need to support Win Vista and later). I've tried to accomplish this with html and rtf but both have pros and cons. I've decided to use rtf and TRichEdit as an editor. It has nice interface and it's easy to write needed functionality. The problem is with rendering (already solved that part) and zooming it in reasonable image quality and linear scaling (or almost linear). I've alreday tried 2 approaches:

  1. Rendering into bitmap and then zooming - nice linear scaling, but terrible pixelated image - as expected
  2. Zooming via TRichEdit feature and then rendering into bitmap - nice sharp image, but linear scaling is gone.

Is there some other approach? Thanks.

Michal Vašut
  • 187
  • 2
  • 8
  • Well how about scaling the `TRichEdit` to the maximum zoom you require and only scale down to the canvas. Well memory requirements will be higher but the quality shouldn't suffer that much. To get the best result make sure to call `SetStretchBltMode` with `HALFTONE` argument. – Honza R Jul 27 '16 at 08:08

0 Answers0