Skia
momapy.rendering.skia
Class for rendering with Skia
Classes:
Name | Description |
---|---|
SkiaRenderer |
Class for skia renderers |
SkiaRenderer
dataclass
SkiaRenderer(_current_state: dict = dict(), _states: list[dict] = list(), *, canvas: Canvas, _config: dict = dict(), _skia_typefaces: dict = dict(), _skia_fonts: dict = dict())
Bases: StatefulRenderer
Class for skia renderers
Methods:
Name | Description |
---|---|
begin_session |
Begin a session |
end_session |
End a session |
get_bolder_font_weight |
Return the lightest font weight bolder than the given font weight |
get_current_state |
Return the current state |
get_current_value |
Return the current value for an attribute |
get_initial_value |
Return the initial value for an attribute |
get_lighter_font_weight |
Return the boldest font weight lighter than the given font weight |
new_page |
Make a new page |
render_drawing_element |
Render a drawing element |
render_layout_element |
Render a layout element |
render_map |
Render a map |
restore |
Set the current state to the last saved state |
save |
Save the current state |
set_current_state |
Set the current state to the given state |
set_current_state_from_drawing_element |
Set the current state to a state given by a drawing element |
set_current_value |
Set the current value for an attribute |
begin_session
end_session
End a session
Source code in src/momapy/rendering/skia.py
get_bolder_font_weight
classmethod
get_bolder_font_weight(font_weight: FontWeight | float) -> float
Return the lightest font weight bolder than the given font weight
Source code in src/momapy/rendering/core.py
get_current_state
get_current_value
get_initial_value
Return the initial value for an attribute
Source code in src/momapy/rendering/core.py
get_lighter_font_weight
classmethod
get_lighter_font_weight(font_weight: FontWeight | float) -> float
Return the boldest font weight lighter than the given font weight
Source code in src/momapy/rendering/core.py
new_page
render_drawing_element
Render a drawing element
Source code in src/momapy/rendering/skia.py
render_layout_element
render_map
restore
Set the current state to the last saved state
save
set_current_state
set_current_state_from_drawing_element
set_current_state_from_drawing_element(drawing_element: DrawingElement)
Set the current state to a state given by a drawing element
Source code in src/momapy/rendering/core.py
set_current_value
Set the current value for an attribute