Print Page | Close Window

Delphi TChart example

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: Sample Code
Forum Description: Share Debenu Quick PDF Library sample code with other forum members
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1144
Printed Date: 03 May 24 at 2:14PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Delphi TChart example
Posted By: RhoTu
Subject: Delphi TChart example
Date Posted: 10 Jul 09 at 3:49PM
The following code is a snippet from an application that uses a TChart component that is inserted into a document
 
HTH
 
RT
 
    rcfTchart:begin
                strm:=TMemoryStream.Create;
                img:=TImage.Create(nil);
                rcChart.Width:=trunc(width*600);
                rcChart.Height:=trunc(height*600);
                img.Width:=rcChart.Width;
                img.Height:=rcChart.Height;
                rcChart.PrintPartialCanvas(img.Canvas,rect(0,0,rcChart.Width,rcChart.Height));
                img.Picture.Graphic.SaveToStream(strm);
                strm.Seek(0,0);
                imgID:=doc.AddImageFromStream(strm,0);
                doc.SelectImage(imgID);
                doc.DrawImage(left,top,width,height);
                freeAndNil(img);
                freeAndNil(strm);
                used:=used+height;
              end;



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk