svgen package#
Subpackages#
- svgen.attribute package
- svgen.cartesian package
- svgen.color package
- svgen.element package
- svgen.generation package
- svgen.shapes package
Submodules#
svgen.app module#
svgen - This package’s command-line entry-point application.
- svgen.app.add_app_args(parser: ArgumentParser) None [source]#
Add application-specific arguments to the command-line parser.
svgen.display module#
A module for working with common display assets.
- class svgen.display.AspectRatio(width: int, height: int, final: bool = False)[source]#
Bases:
NamedTuple
A class to storge a width and height ratio.
- property args: List[str]#
Get inkscape command-line arguments.
- static create(wxh: str, delim: str = ':') AspectRatio [source]#
Create an aspect ration from a string.
- final: bool#
Alias for field number 2
- height: int#
Alias for field number 1
- property landscape: bool#
Determine if this ratio is landscape.
- property over_height: float#
Express this ratio as one of width over height.
- property portrait: bool#
Determine if this ratio is portrait.
- rotate() AspectRatio [source]#
Get this aspect ratio rotated.
- property square: bool#
Determine if this is a square aspect ratio.
- width: int#
Alias for field number 0
- svgen.display.common_sizes(ratio: str | AspectRatio | ViewBox) Iterator[AspectRatio] [source]#
Iterate over common sizes for a given aspect ratio.
svgen.entry module#
This package’s command-line entry-point (boilerplate).
svgen.inkscape module#
A module for generating image outputs from SVG via Inkscape.
- class svgen.inkscape.InkscapeTask(name: str, *args, execute: Callable[[Dict[str, Dict[str, Any]], Dict[str, Any]], Coroutine[Any, Any, bool]] = None, log: Logger = None, timer: Timer = None, target: Target = None, **kwargs)[source]#
Bases:
SubprocessExecStreamed
A task implementation for invoking inkscape at command-line.
svgen.script module#
svgen - A module for working with external scripts.
Module contents#
Useful defaults and other package metadata.