summaryrefslogtreecommitdiffstats
path: root/DOCS/man/lua.rst
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-03-06 18:20:11 +0100
committerwm4 <wm4@nowhere>2020-03-06 18:20:11 +0100
commit7a76b577d85ddc8f9e255b1a1c195ee88b76a7d8 (patch)
treecf51a99eae3a5356680480a72c6fb81dbb7d8d91 /DOCS/man/lua.rst
parentc6822b853d7475e8bf3b2c9f6823b7d74cf86950 (diff)
downloadmpv-7a76b577d85ddc8f9e255b1a1c195ee88b76a7d8.tar.bz2
mpv-7a76b577d85ddc8f9e255b1a1c195ee88b76a7d8.tar.xz
command: extend osd-overlay command with bounds reporting
This is more or less a minimal hack to make _some_ text measurement functionality available to scripts. Since libass does not support such a thing, this simply uses the bounding box of the rendered text. This is far from ideal. Problems include: - using a bitmap bounding box - additional memory waste and/or flushing caches - dependency on window size - odd small deviations with different window sizes (run osd-test.lua and resize the window after each timer update; the bounding boxes aren't adjusted in an overly useful way) - inability to query the size _after_ actual rendering But I guess it's a start. Since I'm aware that it's crap, add a threat to the manpage that this may be changed/removed again. For now, I'm interested whether anyone will have use for it in its current form, as it's an often requested feature.
Diffstat (limited to 'DOCS/man/lua.rst')
-rw-r--r--DOCS/man/lua.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/DOCS/man/lua.rst b/DOCS/man/lua.rst
index a9fc02ed44..92debe8a75 100644
--- a/DOCS/man/lua.rst
+++ b/DOCS/man/lua.rst
@@ -599,6 +599,7 @@ are useful only in special situations.
``update()``
Commit the OSD overlay to the screen, or in other words, run the
``osd-overlay`` command with the current fields of the overlay table.
+ Returns the result of the ``osd-overlay`` command itself.
``remove()``
Remove the overlay from the screen. A ``update()`` call will add it