I have been making a 3D OpenGL plot. The axis caption titles for the Depth and Right Axes are not plotted in the correct position (I believe this is a know bug). Hence I am trying to custom draw these titles using an after draw. The problem is I cannot figure out how to accurately find the position of the axes on the plot. Currently I am using for the Depth axis caption :
Code: Select all
procedure TCapPressFuncXplot.Draw3DAxisLabels;
Var
fTchart : TChart;
fCanvas : TCanvas3D;
x, y, z : Integer;
begin
fTchart := XplotChartFrm.Chart1;
fCanvas := fTchart.Canvas;
fCanvas.Font.Size := fTchart.DepthAxis.Title.Font.Size;
fCanvas.Font.Color := fTchart.DepthAxis.Title.Font.Color;
x := fTchart.ChartWidth - fTchart.MarginLeft;
y := fTchart.ChartHeight - fTchart.MarginTop;
Z := fTchart.Width3D div 2;
fCanvas.TextOut3D(X,Y,Z,fTchart.DepthAxis.Title.Caption);
end;
What is the correct method for calculating the X and Y values (should be bottom right corner of plot) for use in the routine TextOut3D.
Thanks Frank