Page 1 of 1

Problem with OpenGL and View3DOptions.Orthogonal := False

Posted: Wed Jun 20, 2007 7:24 am
by 9245066
Hi there,

The code I use for this Test, with Chart1 = 345x281 and Chart2 = 669x545

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
var gl1:TTeeOpenGL;
begin
  gl1 := TTeeOpenGl.Create(self);
  gl1.TeePanel := chart2;
  gl1.Active := true;
  With Chart2 do
  begin
    View3DOptions.Orthogonal := False;
    AddSeries(TSurfaceseries.Create(self));
    Series[0].FillSampleValues(100);
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
var  gl2:TTeeOpenGL;
begin
  gl2 := TTeeOpenGl.Create(self);
  gl2.TeePanel := chart1;
  gl2.Active := true;
  with chart1 do
  begin
    View3DOptions.Orthogonal := False;
    AddSeries(TSurfaceseries.Create(self));
    Series[0].FillSampleValues(100);
  end;
end;

I except, that when I push button1 that Chart2 shows the data
the same way like Chart1. But it doesn't:
http://img404.imageshack.us/img404/7972/blubbji1.jpg


Kind regards,
hmi

Posted: Wed Jun 27, 2007 10:57 am
by Pep
Hi,

yes, it's as known problem, for the moment a workaroun is to change the zoom manually depending on the Chart size :

Chart2.Aspect.Zoom:=50;