TCanvas3D.Calculate3DPosition

TCanvas3D.Calculate3DPosition
TCanvas3D

function Calculate3DPosition(Const P: TPoint3D): TPoint; overload;

Unit
TeCanvas

Description
Calculates and returns the XY position in pixels of the XYZ 3D coordinate.

Can be used when custom drawing using 3D XYZ coordinates, either returned from the axes or not.

Example

Chart1.OnAfterDraw...
Var P:TPoint;
With Chart1.Canvas do
begin
P:=Calculate3DPosition( ChartXCenter, ChartYCenter, 20 );
Cube( P.X-10,P.X+10,P.Y-10,P.Y+10,15,25, True );
end;

Draws a Cube centered on the middle of the Chart, at Z position of "20".