RetrieveInitialXYAfterRotation
procedure RetrieveInitialXYAfterRotation (X: LongInt; Y: LongInt; var Original_X: OleVariant; var Original_Y: OleVariant);
void __fastcall RetrieveInitialXYAfterRotation(System::LongInt X, System::LongInt Y, System::LongInt &OriginalX, System::LongInt &OriginalY);
public void RetrieveInitialXYAfterRotation(int X, int Y, ref int OriginalX, ref int OriginalY);
Public Sub RetrieveInitialXYAfterRotation(X As Integer, Y As Integer, ByRef OriginalX As Integer, ByRef OriginalY As Integer)
void RetrieveInitialXYAfterRotation (int X, int Y, int *OriginalX, int *OriginalY);
Retrieves the initial frame coordinates after a VideoProcessing_Rotation has been applied and OverlayAfterTransform is enabled. This procedure is used mainly to make a drawing from the OnFrameOverlayUsingDC event that is not rotated when OverlayAfterTransform is enabled.
E.g.:
procedure TfrmMainForm.VideoGrabberFrameOverlayUsingDC(Sender: TObject; Dc: HDC; FrameNumber: Cardinal; FrameTime: Int64; FrameId: Integer);
var
Canvas: TCanvas;
SrcX, SrcY: LongInt;
DestX, DestY: LongInt;
begin
Canvas := TCanvas.Create;
Canvas.Handle := Dc;
Canvas.Pen.Color := clWhite;
VideoGrabber.RetrieveInitialXYAfterRotation (100, 100, SrcX, SrcY);
VideoGrabber.RetrieveInitialXYAfterRotation (100, 200, DestX, DestY);
Canvas.MoveTo (SrcX, SrcY);
Canvas.Pixels[SrcX, SrcY] := clWhite;
Canvas.LineTo (DestX, DestY);
Canvas.Free;
end;