# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class symbolType:
    def __init__(self, content="symbolType"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def draw(self, context=None, size=None):
        """
        Renders this symbol type to the specified context with the specified size in square
        pixels. The context implements the CanvasPathMethods interface. (Note that this is a
        subset of the CanvasRenderingContext2D interface!) See also d3-path.

        See more informations `here <https://d3js.org/d3-shape/symbol#symbolType_draw>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (context, size))))
        return symbolType(content=f"{self.content}.draw({arguments})")

