Skip to content

draw#

This package defines drawers for different styles of text art.

Styles

Refer to the Styles documentation for an in-depth guide to the image processing behind Picharsso.

DRAWERS: dict #

The collection of drawers.

new_drawer(style, **kwargs) #

Creates a new drawer instance.

Parameters:

Name Type Description Default
style str

The style of the text art.

required
**kwargs dict

Appropriate keyword arguments. See BaseDrawer and others.

{}

Returns:

Type Description
Type[picharsso.draw.BaseDrawer]

The new drawer instance.

Source code in picharsso/draw/__init__.py
17
18
19
20
21
22
23
24
25
26
27
28
29
def new_drawer(style, **kwargs):
    """Creates a new drawer instance.

    Args:
        style (str): The style of the text art.
        **kwargs (dict): Appropriate keyword arguments.
                        See [`BaseDrawer`][picharsso.draw.base.BaseDrawer]
                        and others.

    Returns:
        Type[picharsso.draw.BaseDrawer]: The new drawer instance.
    """
    return DRAWERS[style](**kwargs)