SetTextOverlay_String
procedure SetTextOverlay_String (Index: LongInt; const Value: string);
void __fastcall SetTextOverlay_String(System::LongInt Index, const System::UnicodeString Value);
public void SetTextOverlay_String(int Index, string Value);
Public Sub SetTextOverlay_String(Index As Integer, Value As String)
void SetTextOverlay_String (int Index, wchar_t *Value);
void SetTextOverlay_String (wchar_t *Value);
Sets the text string drawn over the video frames for the specified text overlay. The text string can be composed of several lines.
The string can be changed at any time, even while the text is drawn over the video frames.
Several TVideoGrabber variables can be used within the text string, delimited by a percent symbol (2). When TVideoGrabber detects one of these variables, the variable label is replaced by its current value:
-
"%sys_time[dd/mm/yy hh:nn:ss]%": current system date/time (1)
-
"%dv_time[dd/mm/yy hh:nn:ss]%": current date/time stored on the DV VCR tape (1)
-
"%time_code%": current DV VCR time code, if available
-
"%frame_count%": number of the current frame
-
"%time_full%": time of the current frame in hh:mm:ss:cc format
-
"%time_sec%": time of the current frame, in seconds with 2 decimals
-
"%time_100ns%": time of the current frame, in 100-nanosecond units
-
"%custom0%" to "%custom9%": up to 10 custom variables that can be set with SetTextOverlay_CustomVar
(1) Any valid date/time format is accepted between the brackets of sys_time and dv_time.
(2) The percent symbol is a reserved character. To display the percent symbol itself, duplicate it, e.g. SetTextOverlay_String (0, "the percent symbol is %%") for the 1st text overlay (index 0).
Performance: a text that does not change is rendered once and blended into each frame. A text whose variables change on every frame (%frame_count%, %time_full%, %time_sec%, %time_100ns%...) is drawn again on every frame, which costs several ms per frame on 4K / 8K frames (large fonts, SetTextOverlay_Proportional).
See also SetTextOverlay_CustomVar.