whenever I call the draw procedure of a OpenGL TChart I get an error message:
ViewPort 1282, VCLTee.TeeGLCanvas.pas, line 923
Just execute this code on a TChart (MyChart) in OpenGL mode:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
const
ReportChartWidthC = 800;
ReportChartHeightC = 600;
var
PaintRect: TRect;
MyBitmap: TBitmap;
begin
PaintRect := Rect(0, 0, ReportChartWidthC, ReportChartHeightC);
MyBitmap := TBitmap.Create;
try
MyBitmap.SetSize(ReportChartWidthC, ReportChartHeightC);
MyChart.Draw(MyBitmap.Canvas, PaintRect);
finally
MyBitmap.Free;
end;
end;
Is there any workarround available to get a bitmap of an OpenGL chart ?
best regards