(
            self,
            background: PIL.Image.Image,
            font,
            line_spacing: Optional[int] = None,
            fill=None,
            left_margin: int = _DEFAULT_LEFT_MARGIN,
            top_margin: int = _DEFAULT_TOP_MARGIN,
            right_margin: int = _DEFAULT_RIGHT_MARGIN,
            bottom_margin: int = _DEFAULT_BOTTOM_MARGIN,
            word_spacing: int = _DEFAULT_WORD_SPACING,
            line_spacing_sigma: Optional[float] = None,
            font_size_sigma: Optional[float] = None,
            word_spacing_sigma: Optional[float] = None,
            end_chars: str = _DEFAULT_END_CHARS,
            perturb_x_sigma: Optional[float] = None,
            perturb_y_sigma: Optional[float] = None,
            perturb_theta_sigma: float = _DEFAULT_PERTURB_THETA_SIGMA,
            features: Set = _DEFAULT_FEATURES,
    )
Note that, all the Integer parameters are in pixels.

        Although, it provides some reasonable default values for some
        parameters, it is strongly recommended to explicitly set these
        parameters according to the characteristic of a particular task.

        `font` should be a Pillow's font instance.

        `fill` is the pixel value filled to the background as font color, e.g.
        `(255, 0, 0)` for the backgrounds with RGB mode and `0` for the
        backgrounds with L mode.

        `word_spacing` can be less than `0`, but must be greater than
        `-font.size // 2`.

        `line_spacing_sigma`, `font_size_sigma` and `word_spacing_sigma` are the
        sigmas of the gauss distributions of line spacing, font size and word
        spacing, respectively.

        `end_chars` is the collection of Chars which cannot be placed in the
        beginning of a line.

        `perturb_x_sigma`, `perturb_y_sigma` and `perturb_theta_sigma` are the
        sigmas of the gauss distributions of the horizontal position, the
        vertical position and the rotation of strokes, respectively.

        **EXPERIMENT**
        Use `features` to turn on the extra features, see `handright.Feature`.
Note that, all the Integer parameters are in pixels.
Note that all the Integer parameters are in pixels .
def __init__(
            self,
            background: PIL.Image.Image,
            font,
            line_spacing: Optional[int] = None,
            fill=None,
            left_margin: int = _DEFAULT_LEFT_MARGIN,
            top_margin: int = _DEFAULT_TOP_MARGIN,
            right_margin: int = _DEFAULT_RIGHT_MARGIN,
            bottom_margin: int = _DEFAULT_BOTTOM_MARGIN,
            word_spacing: int = _DEFAULT_WORD_SPACING,
            line_spacing_sigma: Optional[float] = None,
            font_size_sigma: Optional[float] = None,
            word_spacing_sigma: Optional[float] = None,
            end_chars: str = _DEFAULT_END_CHARS,
            perturb_x_sigma: Optional[float] = None,
            perturb_y_sigma: Optional[float] = None,
            perturb_theta_sigma: float = _DEFAULT_PERTURB_THETA_SIGMA,
            features: Set = _DEFAULT_FEATURES,
    ):
        """Note that, all the Integer parameters are in pixels.

        Although, it provides some reasonable default values for some
        parameters, it is strongly recommended to explicitly set these
        parameters according to the characteristic of a particular task.

        `font` should be a Pillow's font instance.

        `fill` is the pixel value filled to the background as font color, e.g.
        `(255, 0, 0)` for the backgrounds with RGB mode and `0` for the
        backgrounds with L mode.

        `word_spacing` can be less than `0`, but must be greater than
        `-font.size // 2`.

        `line_spacing_sigma`, `font_size_sigma` and `word_spacing_sigma` are the
        sigmas of the gauss distributions of line spacing, font size and word
        spacing, respectively.

        `end_chars` is the collection of Chars which cannot be placed in the
        beginning of a line.

        `perturb_x_sigma`, `perturb_y_sigma` and `perturb_theta_sigma` are the
        sigmas of the gauss distributions of the horizontal position, the
        vertical position and the rotation of strokes, respectively.

        **EXPERIMENT**
        Use `features` to turn on the extra features, see `handright.Feature`.
        """
        self.set_background(background)
        self.set_font(font)
        self.set_line_spacing(line_spacing)
        self.set_fill(fill)
        self.set_left_margin(left_margin)
        self.set_top_margin(top_margin)
        self.set_right_margin(right_margin)
        self.set_bottom_margin(bottom_margin)
        self.set_word_spacing(word_spacing)
        self.set_line_spacing_sigma(line_spacing_sigma)
        self.set_font_size_sigma(font_size_sigma)
        self.set_word_spacing_sigma(word_spacing_sigma)
        self.set_end_chars(end_chars)
        self.set_perturb_x_sigma(perturb_x_sigma)
        self.set_perturb_y_sigma(perturb_y_sigma)
        self.set_perturb_theta_sigma(perturb_theta_sigma)
        self.set_features(features)
def __init__ ( self , background : PIL . Image . Image , font , line_spacing : Optional [ int ] = None , fill = None , left_margin : int = _DEFAULT_LEFT_MARGIN , top_margin : int = _DEFAULT_TOP_MARGIN , right_margin : int = _DEFAULT_RIGHT_MARGIN , bottom_margin : int = _DEFAULT_BOTTOM_MARGIN , word_spacing : int = _DEFAULT_WORD_SPACING , line_spacing_sigma : Optional [ float ] = None , font_size_sigma : Optional [ float ] = None , word_spacing_sigma : Optional [ float ] = None , end_chars : str = _DEFAULT_END_CHARS , perturb_x_sigma : Optional [ float ] = None , perturb_y_sigma : Optional [ float ] = None , perturb_theta_sigma : float = _DEFAULT_PERTURB_THETA_SIGMA , features : Set = _DEFAULT_FEATURES , ) : self . set_background ( background ) self . set_font ( font ) self . set_line_spacing ( line_spacing ) self . set_fill ( fill ) self . set_left_margin ( left_margin ) self . set_top_margin ( top_margin ) self . set_right_margin ( right_margin ) self . set_bottom_margin ( bottom_margin ) self . set_word_spacing ( word_spacing ) self . set_line_spacing_sigma ( line_spacing_sigma ) self . set_font_size_sigma ( font_size_sigma ) self . set_word_spacing_sigma ( word_spacing_sigma ) self . set_end_chars ( end_chars ) self . set_perturb_x_sigma ( perturb_x_sigma ) self . set_perturb_y_sigma ( perturb_y_sigma ) self . set_perturb_theta_sigma ( perturb_theta_sigma ) self . set_features ( features )