trichview.support
Re: painting the richview to a bitmap |
Author |
Message |
Sergey Tkachenko |
Posted: 12/08/2004 11:16:36 Use TRVReportHelper component. var bmp: TBitmap; const Width = 200; Factor = 5; bmp := TBitmap.Create; RVReportHelper1.Init(bmp.Canvas, Width); while RVReportHelper1.FormatNextPage($FFFFFFF) do; bmp.Width := Width*Factor; bmp.Height := RVReportHelper1.GetLastPageHeight*Factor; SetMapMode(bmp.Canvas.Handle,MM_ANISOTROPIC); SetWindowExtEx(bmp.Canvas.Handle, Width, RVReportHelper1.GetLastPageHeight, nil); SetViewportExtEx(bmp.Canvas.Handle, bmp.Width, bmp.Height, nil); RVReportHelper1.DrawPage(1,bmp.Canvas,True, RVReportHelper1.EndAt); SetMapMode(Canvas.Handle,MM_TEXT); > Hello, > > I have been using the rvData.paintTo method to paint the richview onto > a bitmap. The problem is that I need to paint the blow that bitmap up > by a factor of 5, and then what happens is that the text looks > pixelated. > > Is it possible to render the richview onto a bitmap of an arbitrary > size? > > One thing I can think of is to use the rvData.paintTo to paint onto a > metafile canvas. Then call stretchDraw from the metafile canvas to a > larger bitmap canvas. But I was wondering if there was a more elegant > way. > > -Dave |
Powered by ABC Amber Outlook Express Converter