Problem with TeeCreateBitmap function
Posted: Thu Oct 23, 2008 4:02 pm
I use TeeChart Pro v8.04 with Delphi2006.
I want to create a bitmap of my chart to insert it in a report (who is producted by my software).
So I use the TeeCreateBitmap function to create a Bitmap. And this Bitmap is draw on a canvas for printing.
But On the paper, the legend, the title Axis and the title Chart (all fonts) are very small .
I found a solution : saving chart to a bitmap file and loading this file to draw in a printer canvas.
Is there a better way to solve my problem and avoid saving to a file ?
I want to create a bitmap of my chart to insert it in a report (who is producted by my software).
So I use the TeeCreateBitmap function to create a Bitmap. And this Bitmap is draw on a canvas for printing.
But On the paper, the legend, the title Axis and the title Chart (all fonts) are very small .
Code: Select all
MyBitmap :TBitmap;
Chart1 :TChart;
Canvas : TCanvas;
...
MyBitmap := chart1.TeeCreateBitmap(clWhite,FRect,pf8bit);
Canvas.draw(myRect.Left,myRect.Top,MyBitmap);
Code: Select all
MyBitmap :TBitmap;
Chart1 :TChart;
...
Chart1.SaveToBitmapFile('C:\temp\mychart.bmp');
MyBitmap := chart1.TeeCreateBitmap(clWhite,FRect,pf8bit);
MyBitmap.loadfromfile('C:\temp\mychart.bmp');
Canvas.draw(myRect.Left,myRect.Top,MyBitmap);