Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 856 - CalcXPosValue after DrawToMetaCanvas isn’t work correctly.
Summary: CalcXPosValue after DrawToMetaCanvas isn’t work correctly.
Status: CONFIRMED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 140512
Hardware: PC Windows
: High normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-21 04:30 EDT by sandra pazos
Modified: 2014-07-21 13:47 EDT (History)
1 user (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sandra pazos 2014-07-21 04:30:20 EDT
CalcXPosValue after DrawToMetaCanvas isn't work correctly. The following code generates a different value the first and second time you call CalcXPos if a DrawToMetaCanvas is in the middle. This is because DrawToMetaCanvas resets the StartPos and EndPos of the axes and it is never set back

procedure TForm1.Button1Click(Sender: TObject);
var
  mf:TMetafile;
  mfc:TMetafileCanvas;
begin
  series1.AddXY(5,5);
  series1.AddXY(15,15);
  series1.AddXY(25,25);
  mf:=TMetafile.Create;
  mf.Width:=1000;
  mf.Height:=1000;
  mfc:=TMetafileCanvas.Create(mf,0);
   showMessage(chart1.LeftAxis.CalcXPosValue(15).toString);
  chart1.DrawToMetaCanvas(mfc,rect(0,0,1000,1000));
  mfc.Free;
  mf.Free;
  showMessage(chart1.LeftAxis.CalcXPosValue(15).toString);
end;