Scalabium Software

SMExport/SMImport suites
Knowledge for your independence'.
Home Delphi and C++Builder tips


#64: How can I draw a chart on own canvas?

Sometimes you need draw the chart on the own canvas. For example, you want to print a chart or include the chart in own bitmap. You can make it so:

1. yourChart.DrawToMetaCanvas(ACanvas, ARect);

or

2. 
var intChartWidth, intChartHeight: Integer;
    Meta: TMetaFile;
begin
  Meta := yourChart.TeeCreateMetafile(False, Rect(0, 0, intChartWidth, intChartHeight));
  try
    ACanvas.StretchDraw(ARect, Meta);
  finally
    Meta.Free;
  end;
end;

, where
- yourChart is a "source" chart component
- ARect is a rect in which you want to place a chart image,
- ACanvas is a "target" canvas

In the SMReport Designer I used the first procedure for chart outputing on the report band.


Published: February 1, 2000

See also
 
Mail parser (ActiveX)
MAPIMail
SMExport suite
Viewer for MS Outlook Messages
Viewer for TNEF-files (winmail.dat)
Clarion to Text converter
Database Information Manager
ABA Database Convert
SMImport suite
Excel Web-stream
 
 


Contact to webmaster

 

Borland Software Code Gear Scalabium Delphi tips

Copyright© 1998-2021, Scalabium Software. All rights reserved.
webmaster@scalabium.com

SMReport Autogenerated