ScnLib_SetWebcamPosition()

ScnLib_SetWebcamPosition()

Std EditionPro EditionMax EditionUltra Edition
C++ __declspec(dllimport) void __stdcall ScnLib_SetWebcamPosition(int nPosition, int nMarginX, int nMarginY);
C# [DllImport("ScnLib.dll")] public static extern void ScnLib_SetWebcamPosition(int Position, int MarginX, int MarginY);
Basic Public Declare Sub ScnLib_SetWebcamPosition Lib "ScnLib.dll" (ByVal Position As Int32, ByVal MarginX As Int32, ByVal MarginY As Int32)
Delphi procedure ScnLib_SetWebcamPosition(Position: Integer; MarginX: Integer; MarginY: Integer); stdcall; external 'ScnLib.dll';
  • Description
    Adjust the position of the webcam view.

  • Parameters
    • Position [in]
      • SCNLIB_POSITION_TOP_LEFT : Positioned at the top-left corner of the video.
      • SCNLIB_POSITION_TOP : Positioned at the top side of the video.
      • SCNLIB_POSITION_TOP_RIGHT : Positioned at the top-right corner of the video.
      • SCNLIB_POSITION_RIGHT : Positioned at the right side of the video.
      • SCNLIB_POSITION_BOTTOM_RIGHT : Positioned at the bottom-right corner of the video.
      • SCNLIB_POSITION_BOTTOM : Positioned at the bottom side of the video.
      • SCNLIB_POSITION_BOTTOM_LEFT : Positioned at the bottom-left corner of the video.
      • SCNLIB_POSITION_LEFT : Positioned at the left side of the video.
      • SCNLIB_POSITION_CENTER : Positioned at the center of the video.
    • MarginX [in]
      The horizontal margin, representing the offset from the edge of the video. A negative margin value is permitted and utilized for aligning the webcam view against a side of the main screen.
    • MarginY [in]
      The vertical margin, representing the offset from the edge of the video. A negative margin value is permitted and utilized for aligning the webcam view against a side of the main screen.
  • Return Value
    None.

  • Remarks
    Use this function to adjust the position of the webcam view. Initially, the webcam view is located at the bottom-right corner of the video (SCNLIB_POSITION_BOTTOM_RIGHT). You may position a webcam view anywhere in the video. While placing a webcam view in the corners of the main screen is common and usually unobtrusive, aligning it against a side of the main screen is practically the optimal position as it avoids covering any part of the main screen. The key to align a webcam view against a side of the main screen is to set negative margin values to offset it by its width or height so it appears adjacent to the main screen. For more details, refer to the ScnLib_SetLayoutContext() function. You are permitted to change the webcam view position even while recording is in progress. To check the current position of the webcam view, call ScnLib_GetWebcamPosition().

  • See Also
    ScnLib_GetWebcamPosition()
    ScnLib_SetWebcamViewSize()
    ScnLib_SetLayoutContext()

Try the SDK for FREE SDK APIs overview