( number) Frame to obtain the beginning time of. Use loaded frame rate data to convert a frame number of the video intoĪn absolute time in milliseconds. Synopsis: ms = aegisub.ms_from_frame(frame) If the time is in the middle of the frame it is "rounded down" to the frame frame ( number) Frame number corresponding to the time in ms, or nil if there is no ( number) Absolute time from the beginning of the video, for Use loaded frame rate data to convert an absolute time given in The beginning time of a frame is included in the range while theĮnding time is excluded from the range. The ending time of a frame is the beginning time of the One-dimensional time line, a time stamp is a point on the time line, whileĪ video frame spans a range of the time line, from its beginning time to One thing to remember when using these functions is that, considering a get the timestamps of a number of sequential frames andĬalculate coordinates, sizes etc. The primary purpose of these functions is to be able to generate per-frameĮffects, i.e. Getting information on the videoĪutomation 4 Lua offers two functions designed to be able to work withįrame-based timing without having to consider whether the video source is Note that in the bundled macros this is always aliased to tr for the sake Translations), but if you happen to be using strings that are present in This is mostly only intended for scriptsīundled with Aegisub (as there's no way for you to add your own Synopsis: translation = aegisub.gettext(untranslated) Rendered sizes of bits and pieces of a longer text, which can then be Rather, it is intended as a helper to create text layouts by determining It cannot handle any kind of formatting codes or text layout. You should only feed plain text strings without line breaks into thisįunction. ext_lead (number) External leading for the font. descent ( number) Length of descenders in the font. height ( number) Height in pixels of the text. Should not contain line breaks ( \n or \r\n) nor should it containįormatting codes of any kind. ( string) The text the extents should be determined for. The font name, size, weight, style, spacing andĮncoding is used to determine the size of the text. Obtain system font metrics and determine the rendered size in pixels of the Synopsis: width, height, descent, ext_lead = aegisub.text_extents(style, text) Immediately end execution of the current script, rolling back any changes These can't be clearly placed into any of the other mainĬategories and there's too few of each kind to warrant a separate category. This page documents miscellaneous APIs useful for working with
0 Comments
Leave a Reply. |