Skip to content

TextOverlay_Selector

property

Delphi
property TextOverlay_Selector: LongInt read GetTextOverlaySelector write SetTextOverlaySelector;
C++Builder
__property System::LongInt TextOverlay_Selector = {read=GetTextOverlaySelector, write=SetTextOverlaySelector, nodefault};
C#
public int TextOverlay_Selector { get; set; }
VB.NET
Public Property TextOverlay_Selector As Integer
C++/Qt
int GetTextOverlay_Selector ();
void SetTextOverlay_Selector (int Value);

Selects the group of text overlay settings to use. Up to 1000 text overlay groups of settings may be used, allowing different text overlays (with different color, background, transparency, font size, etc...) to be performed at the same time.

The default text overlay settings correspond to the group 0 (TextOverlay_Selector = 0).

Note that TVideoGrabber does not allocate the resources for 1000 text overlays, by default it allocates only one font and one parameter set, corresponding to TextOverlay_Selector = 0 (the resource allocation is made when TextOverlay_Selector receives a new value never used before, see the Text overlays chapter for more explanations).

Set TextOverlay_Selector to the index of the text overlay properties to read or write before reading or writing their values. It is applied to all the TextOverlay_... properties.

E.g.:

procedure TfrmMainForm.Button17Click(Sender: TObject);

begin VideoGrabber.TextOverlay_Selector := 0;

VideoGrabber.TextOverlay_String := 'frame number: %frame_count%';

VideoGrabber.TextOverlay_Left := 10;

VideoGrabber.TextOverlay_Top := 10;

VideoGrabber.TextOverlay_Transparent := True;

VideoGrabber.TextOverlay_Font.Color := clRed;

VideoGrabber.TextOverlay_Font.Size := 12;

VideoGrabber.TextOverlay_Enabled := true;

VideoGrabber.TextOverlay_Selector := 1;

VideoGrabber.TextOverlay_String := 'frame time: %time_100ns%';

VideoGrabber.TextOverlay_Left := VideoGrabber.VideoWidth - 120;

VideoGrabber.TextOverlay_Right := VideoGrabber.VideoWidth;

VideoGrabber.TextOverlay_Top := 60;

VideoGrabber.TextOverlay_Transparent := False;

VideoGrabber.TextOverlay_BkColor := clBlack;

VideoGrabber.TextOverlay_Font.Color := clWhite;

VideoGrabber.TextOverlay_Font.Size := 8;

VideoGrabber.TextOverlay_Enabled := true;

end;

in C++: void __fastcall TfrmMainForm::Button2Click(TObject Sender)

{

VideoGrabber->TextOverlay_Selector = 0;

VideoGrabber->TextOverlay_String = "frame number: %frame_count%";

VideoGrabber->TextOverlay_Left = 10;

VideoGrabber->TextOverlay_Top = 10;

VideoGrabber->TextOverlay_Transparent = True;

VideoGrabber->TextOverlay_Font->Color = clRed;

VideoGrabber->TextOverlay_Font->Size = 12;

VideoGrabber->TextOverlay_Enabled = true;

VideoGrabber->TextOverlay_Selector = 1;

VideoGrabber->TextOverlay_String = "frame time: %time_100ns%";

VideoGrabber->TextOverlay_Left = VideoGrabber->VideoWidth - 120;

VideoGrabber->TextOverlay_Right = VideoGrabber->VideoWidth;

VideoGrabber->TextOverlay_Top = 60;

VideoGrabber->TextOverlay_Transparent = False;

VideoGrabber->TextOverlay_BkColor = clBlack;

VideoGrabber->TextOverlay_Font->Color = clWhite;

VideoGrabber->TextOverlay_Font->Size = 8;

VideoGrabber->TextOverlay_Enabled = true;

}

in VB:

Private Sub Command1_Click()

VideoGrabberVB61.TextOverlay_Selector = 0 VideoGrabberVB61.TextOverlay_String = "frame number: %frame_count%"

VideoGrabberVB61.TextOverlay_Left = 10 VideoGrabberVB61.TextOverlay_Top = 10 VideoGrabberVB61.TextOverlay_Transparent = True VideoGrabberVB61.TextOverlay_FontColor = &HC0C0C0 VideoGrabberVB61.TextOverlay_Enabled = True

VideoGrabberVB61.TextOverlay_Selector = 1 VideoGrabberVB61.TextOverlay_String = "frame time: %time_100ns%"

VideoGrabberVB61.TextOverlay_Left = VideoGrabberVB61.VideoWidth - 120 VideoGrabberVB61.TextOverlay_Right = VideoGrabberVB61.VideoWidth VideoGrabberVB61.TextOverlay_Top = 60 VideoGrabberVB61.TextOverlay_Transparent = False VideoGrabberVB61.TextOverlay_BkColor = &H0 VideoGrabberVB61.TextOverlay_FontColor = &HF0B0C0 VideoGrabberVB61.TextOverlay_Enabled = True End Sub