TextOverlay_String
property
property TextOverlay_String: string read GetTextOverlayString write SetTextOverlayString;
__property System::UnicodeString TextOverlay_String = {read=GetTextOverlayString, write=SetTextOverlayString};
public string TextOverlay_String { get; set; }
Public Property TextOverlay_String As String
wchar_t * GetTextOverlay_String (int Index);
wchar_t *GetTextOverlay_String ();
void SetTextOverlay_String (int Index, wchar_t *Value);
void SetTextOverlay_String (wchar_t *Value);
Sets or retrieves the text string that will be drawn over video frames, for the current text overlay selected by TextOverlay_Selector. The text string can be composed of several lines. This property can be modified at any time, even if the text is currently drawn over a video frame.
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 nano-seconds units. "%custom0% to %custom9%": up to 10 custom variables that can be set by using SetTextOverlayCustomVar.
(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. If you need to display the percent symbol itself, just duplicate it, e.g. TextOverlay_String = "the percent symbol is %%".
Note: the frame grabber must be enabled to use TextOverlay properties.
E.g., to initialize the 2 text overlay strings, that will use custom variables:
VideoGrabber.TextOverlay_Selector = 0. VideoGrabber.TextOverlay_String = "my first text uses %custom0%".
VideoGrabber.TextOverlay_Left = 10. VideoGrabber.TextOverlay_Top = 10. VideoGrabber.TextOverlay_Enabled = true.
VideoGrabber.TextOverlay_Selector = 1. VideoGrabber.TextOverlay_String = "my second text uses %custom3% and %custom4%".
VideoGrabber.TextOverlay_Left = 20. VideoGrabber.TextOverlay_Top = 100. VideoGrabber.TextOverlay_Enabled = true.
VideoGrabber.StartPreview ...
then to update the custom variables of the 1st text overlay string:
VideoGrabber.SetTextOverlayCustomVar (0, 0, "value 0") ...
and of the 2nd text overlay string:
VideoGrabber.SetTextOverlayCustomVar (1, 3, "value 3"). VideoGrabber.SetTextOverlayCustomVar (1, 4, "value 4") ...