[][src]Function libass_sys::ass_set_margins

pub unsafe extern "C" fn ass_set_margins(
    priv_: *mut ASS_Renderer,
    t: c_int,
    b: c_int,
    l: c_int,
    r: c_int
)

\brief Set frame margins. These values may be negative if pan-and-scan is used. The margins are in pixels. Each value specifies the distance from the video rectangle to the renderer frame. If a given margin value is positive, there will be free space between renderer frame and video area. If a given margin value is negative, the frame is inside the video, i.e. the video has been cropped.

The renderer will try to keep subtitles inside the frame area. If possible, text is layout so that it is inside the cropped area. Subtitle events that can't be moved are cropped against the frame area.

ass_set_use_margins() can be used to allow libass to render subtitles into the empty areas if margins are positive, i.e. the video area is smaller than the frame. (Traditionally, this has been used to show subtitles in the bottom "black bar" between video bottom screen border when playing 16:9 video on a 4:3 screen.)

When using this function, it is recommended to calculate and set your own aspect ratio with ass_set_pixel_aspect(), as the defaults won't make any sense. @see ass_set_pixel_aspect() \param priv renderer handle \param t top margin \param b bottom margin \param l left margin \param r right margin