Book#
Import |
|
Defined in |
|
Install |
|
Since |
0.10 |
Stability |
Public: follows semantic versioning. Below 1.0, a minor release may change it, and the CHANGELOG says how. |
- class scenet.pipeline.Book[source]#
Bases:
objectA scene compiled: every panel, and the pages they are laid out on.
- panels#
Panel name to compiled panel, in reading order. A panel on a page was compiled at its frame’s size and the page’s type size; one on no page, as it would have been alone.
- Type:
- pages#
One Page Core per page, in order. Empty for a scene with no
pages:.
- notes#
What reading the document noticed that is worth saying but is no fault – in a comic script, a cue with nothing said under it, or a page whose stated count its panels do not match. Each names its line. A panel’s own notes, on what the compiler decided, are on its
CompileResult.
Example
>>> from scenet import Book, compile_book >>> book = compile_book( ... "cast: {a: {reference: alice}}\n" ... "panels: {one: {}, two: {}}\n" ... "pages: [{tiers: [{panels: [one, two]}]}]" ... ) >>> isinstance(book, Book), list(book.panels), len(book.pages) (True, ['one', 'two'], 1)
See also
compile_book, which returns one.render_pages, to draw its pages.- property fonts: dict[str, FontMetrics]#
Every declared font any panel was lettered in, by digest: what to render with.
- property images: dict[str, bytes]#
Every supplied picture any panel was drawn over, once, by digest: what to embed.
- __init__(panels, pages, notes=())#