Name
playout:GetExtents -- get layout extents
Synopsis
ink_rect, logical_rect = playout:GetExtents()
Function
Computes the logical and ink extents of the layout.

Logical extents are usually what you want for positioning things. Note that both extents may have non-zero x and y. You may want to use those to offset where you render the layout. Not doing that is a very typical bug that shows up as right-to-left layouts not being correctly positioned in a layout with a set width.

The extents are given in layout coordinates and in Pango units; layout coordinates begin at the top left corner of the layout.

This function returns tables that have the fields x, y, width, and height initialized.

Inputs
none

Results
ink_rect
extents of the layout as drawn
logical_rect
logical extents of the layout

Show TOC