TVideoGrabber.TextOverlay_Selector

Prev

Next

TVideoGrabber

Properties

 




































































































Selects the current text overlay


Declaration
property TextOverlay_Selector: LongInt read GetTextOverlaySelector write SetTextOverlaySelector;


__property int TextOverlay_Selector==GetTextOverlaySelector, write=SetTextOverlaySelector, nodefault};


Property TextOverlay_Selector as Long

Description

Used to select a group of text overlay settings.

Up to 1000 text overlay groups of settings may be used, allowing to perform different text overlays (with different color, background, transparency, font size, etc...) 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


See Also
TCardinalDirection TOnFrameOverlayUsingDC TOnFrameOverlayUsingDIB TTextOverlayAlign AdjustOverlayAspectRatio DrawBitmapOverFrame GetFrameInfoString ImageOverlay_StretchToVideoSize MouseWheelEventEnabled OnFrameBitmap OnFrameBitmapEventSynchrone OnFrameOverlayUsingDC OnFrameOverlayUsingDIB OnFrameOverlayUsingVIDEOHDR OnMouseDown OnMouseMove OnMouseUp OnMouseWheel OverlayAfterTransform RefreshPlayerOverlays SetImageOverlay_AlphaBlend SetImageOverlay_AlphaBlendValue SetImageOverlay_ChromaKey SetImageOverlay_ChromaKeyLeewayPercent SetImageOverlay_ChromaKeyRGBColor SetImageOverlay_Enabled SetImageOverlay_Height SetImageOverlay_LeftLocation SetImageOverlay_RotationAngle SetImageOverlay_StretchToVideoSize SetImageOverlay_TargetDisplay SetImageOverlay_TopLocation SetImageOverlay_Transparent SetImageOverlay_TransparentColorValue SetImageOverlay_UseTransparentColor SetImageOverlay_Width SetImageOverlayFromBMPFile SetImageOverlayFromHBitmap SetImageOverlayFromHBitmap2 SetImageOverlayFromImageFile SetImageOverlayFromImageFile2 SetImageOverlayFromJPEGFile SetImageOverlayFromTBitmap SetImageOverlayFromTBitmap2 SetImageOverlayFromTImage SetImageOverlayFromTImage2 SetTextOverlay_Align SetTextOverlay_BkColor SetTextOverlay_CustomVar SetTextOverlay_Enabled SetTextOverlay_Font SetTextOverlay_FontColor SetTextOverlay_GradientColor SetTextOverlay_GradientMode SetTextOverlay_HighResFont SetTextOverlay_Left SetTextOverlay_Right SetTextOverlay_Scrolling SetTextOverlay_ScrollingSpeed SetTextOverlay_Shadow SetTextOverlay_ShadowColor SetTextOverlay_ShadowDirection SetTextOverlay_String SetTextOverlay_TargetDisplay SetTextOverlay_Top SetTextOverlay_Transparent ShapeOverlay ShapeOverlayEnabled ShapeOverlayList TextOverlay_Align TextOverlay_BkColor TextOverlay_CreateCustomFont TextOverlay_CreateCustomFont2 TextOverlay_Enabled TextOverlay_Font TextOverlay_FontColor TextOverlay_Left TextOverlay_Right TextOverlay_Scrolling TextOverlay_ScrollingSpeed TextOverlay_Shadow TextOverlay_ShadowColor TextOverlay_ShadowDirection TextOverlay_String TextOverlay_Top TextOverlay_Transparent TranslateMouseCoordinates