BB FlashBack SDK: FBEditor

GetCroppingAutoscrollRectangle

Description

Gets the cropping rectangle for a particular frame. The position of the rectangle can vary from frame to frame depending on the autoscroll setting defined by FBEditor::AutoscrollMode.  

Syntax

[C#/C++]
Public void GetCroppingAutoscrollRectangle (Long lFrame, bool useAutoscroll, bool useAlways, Long* Left, Long* Top, Long* Right, Long* Bottom);

[VB.NET]
public Function GetCroppingAutoscrollRectangle (ByVal lFrame As Integer, ByVal useAutoscroll As Boolean, ByVal useAlways As Boolean, ByRef left As Integer, ByRef top As Integer, ByRef right As Integer, ByRef bottom As Integer)

Parameters

lFrame (in) - the frame to retrieve the cropping region for

useAutoscroll (in) - see the 'Remarks' section below

useAlways (in) - see the 'Remarks' section below  

left (out) - X position of the top left corner of the region

top (out) - Y position of the top left corner of the region

right (out) - X position of the bottom right of the record region

bottom (out) - Y position of the bottom right of the record region

Remarks

The region returned from this function varies depending on the useAutoscroll and useAlways parameters and the FBEditor::UseCroppingAutoscrollRegion and FBEditor::AutoscrollMode properties. Here is pseudo code describing the process:

IF (useAlways = true AND FBEditor::UseCroppingAutoscrollRegion = false)
 return the rect for the whole movie

IF (useAutoscroll = false OR FBEditor::AutoscrollMode = None)
 return the rect set by an earlier call to SetCroppingAutoscrollRect

IF (FBEditor::AutoscrollMode = in_center (1))
 return a rect calculated from the mouse position and previously set rect size

If (AutoscrollMode = keep_visible (6))
 return a pre-calculated region that keeps the mouse near the center of the movie

See Also

FBEditor::SetCroppingAutoscrollRectangle  FBEditor::MakeCroppingPermanent  FBEditor::AutoscrollMode  FBEditor::UseCroppingAutoscrollRegion