From 4f19e50c2352a199cfe79820b1b4942c1d2d9d61 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Tue, 1 May 2012 13:26:05 +0200 Subject: [PATCH] doc/filters: document drawtext draw expression --- doc/filters.texi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 11122f91b9..9182704273 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1273,6 +1273,16 @@ Either a string (e.g. "yellow") or in 0xRRGGBB[AA] format (e.g. "0xff00ff"), possibly followed by an alpha specifier. The default value of @var{boxcolor} is "white". +@item draw +Set an expression which specifies if the text should be drawn. If the +expression evaluates to 0, the text is not drawn. This is useful for +specifying that the text should be drawn only when specific conditions +are met. + +Default value is "1". + +See below for the list of accepted constants and functions. + @item fix_bounds If true, check and fix text coords to avoid clipping. @@ -1490,6 +1500,12 @@ The glyph baseline is placed at half screen height. drawtext=fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_glyph_w)/2:y=h/2-ascent @end example +@item +Show text for 1 second every 3 seconds: +@example +drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\\,3)\\,1):text='blink'" +@end example + @item Use fontconfig to set the font. Note that the colons need to be escaped. @example