1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avfilter/vf_drawtext: add y_align option

The new y_align option specifies if the user provided y value
is referred to the top of the text, to the font baseline or to the
top of the font
This commit is contained in:
yethie
2023-06-14 18:58:32 +02:00
committed by Paul B Mahol
parent 5f2d907de2
commit 692d37d2e9
2 changed files with 46 additions and 11 deletions

View File

@@ -12390,6 +12390,16 @@ The value must contain exactly two letters, one for the vertical alignment (T=to
M=middle, B=bottom) and one for the horizontal alignment (L=left, C=center, R=right).
Please note that tab characters are only supported with the left horizontal alignment.
@item y_align
Specify what the @var{y} value is referred to. Possible values are:
@itemize @bullet
@item @code{text} the top of the highest glyph of the first text line is placed at @var{y}
@item @code{baseline} the baseline of the first text line is placed at @var{y}
@item @code{font} the baseline of the first text line is placed at @var{y} plus the
ascent (in pixels) defined in the font metrics
@end itemize
The default value of @var{y_align} is "text" for backward compatibility.
@item borderw
Set the width of the border to be drawn around the text using @var{bordercolor}.
The default value of @var{borderw} is 0.