Class CairoBackend
Backend that maps Elsie primitives to Cairo commands and renders them to PDF using a Cairo surface.
Declaration
source linkDocumentation
Methods
▶ def __init__(self, cache_dir: str = DEFAULT_CACHE_DIR) override ▶ def compute_text_height(self, parsed_text, style, styles, id_index=None, *args, **kwargs) -> float overrideinherited doc Compute the height of the given text that would be rendered with the given style.
▶ def compute_text_width(self, parsed_text, style, styles, id_index=None, *args, **kwargs) -> float overrideinherited doc Compute the width of the given text that would be rendered with the given style.
▶ def compute_text_x(self, parsed_text, style, styles, *args, id_index=None, **kwargs) -> float overrideinherited doc Compute the x position of the given text that would be rendered with the given style.
▶ def create_render_unit(self, slide, step: int, export_type: str) -> RenderUnit overrideinherited doc Create a render unit that can export itself to PDF or PNG.