Drag marks shifted after export to image file or clipboard

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
SiA
Newbie
Newbie
Posts: 43
Joined: Wed Mar 10, 2004 5:00 am

Drag marks shifted after export to image file or clipboard

Post by SiA » Tue May 09, 2006 9:01 am

:arrow: After user adds drag marks in a chart and chart is exported;
Drag marks are vertically shifted in exported image file (occurs for BMP, JPG, GIF and PCX) and clipboard.

:arrow: occurs with TeeChartPro v7.07 and older, with Delphi 6 and WinXP

:?: Do you know a solution in order to obtain the same position for drag marks in exported image as in chart (WYSIWYG :))?

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue May 09, 2006 9:30 am

Hi SiA,

It works fine for me here using v7.07 and the code below in a chart with a TDragMarksTool. Can you please if this works for you?

Code: Select all

uses TeeBmpOptions, TeeJPEG, TeExport, TeeGIF, GIFImage, TeePNG;

procedure TForm1.Button1Click(Sender: TObject);
var tmpGIF : TGIFImage;
begin
  //BMP
  TeeSaveToBitmap( Chart1, 'myBMPChart.bmp', Chart1.ChartBounds );
  //Chart1.SaveToBitmapFile('myBMPChart.jpg');

  //JPG
  TeeSaveToJPEG( Chart1, 'myJPEGChart.jpg', Chart1.Width, Chart1.Height );

  //GIF
  tmpGIF:=TGIFImage.Create;
  With tmpGIF do
  begin
    Compression:=gcLZW;
    DitherMode:=dmStucki;
    ColorReduction:=rmQuantizeWindows;
    Assign(Chart1.TeeCreateBitmap(Chart1.Color,Rect(0,0,Chart1.Width,Chart1.Height)));
    SaveToFile('myGIFChart.gif');
  end;

  //PNG
  TeeSaveToPNG( Chart1, 'myPNGChart.png', Chart1.Width, Chart1.Height );

  //Clipboard
  //Chart1.CopyToClipboardMetafile(True);  
	Chart1.CopyToClipboardBitmap;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply