PageLayout#

Import

from scenet import PageLayout

Defined in

scenet.ir (source)

Install

pip install scenet

Since

0.10

Stability

Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how.

class scenet.ir.PageLayout[source]#

Bases: Strict

Every page of a scene, and the format they share.

The panels themselves are not part of it: a page names them, and check_placements checks the names against the panels the document defines.

Example

>>> from scenet import PageLayout, parse_scene_document
>>> document = parse_scene_document(
...     "cast: {a: {reference: alice}}\npanels: {one: {}}\n"
...     "pages: [{tiers: [{panels: [one]}]}]"
... )
>>> isinstance(document.layout, PageLayout), len(document.layout.pages)
(True, 1)

See also

PageSpec, one page. PageFormat, the page’s size and margins.

page: PageFormat#

The format every page shares: its size, margin, gutters and bleed.

pages: tuple[PageSpec, ...]#

The pages, in order, each a list of tiers top to bottom.