"""
This type stub file was generated by pyright.
"""

from rdkit.sping.pid import *

"""pidPIL

This module implements a Python Imaging Library PIDDLE canvas.
In other words, this is a PIDDLE backend that renders into a
PIL Image object.  From there, you can save as GIF, plot into
another PIDDLE canvas, etc.
		
Joe Strout (joe@strout.net), 10/26/99
modified for use with sping.
This requires Imaging to be installed as a package PIL
"""
if __name__ == '__main__':
    _fontprefix = ...
else:
    _fontprefix = ...
class PILCanvas(Canvas):
    def __init__(self, size=..., name=...) -> None:
        ...
    
    def __setattr__(self, attribute, value): # -> None:
        ...
    
    def getImage(self): # -> Image:
        ...
    
    def save(self, file=..., format=...): # -> None:
        """format may be a string specifying a file extension corresponding to
        an image file format. Ex: 'png', 'jpeg', 'gif', 'tif' etc.
        These are defined by PIL, not by us so you need to check the docs.
        In general, I just specify an extension and let format default to None"""
        ...
    
    def clear(self): # -> None:
        ...
    
    def stringWidth(self, s, font=...): # -> Any | Literal[0]:
        "Return the logical width of the string if it were drawn \
        in the current font (defaults to self.defaultFont)."
        ...
    
    def fontAscent(self, font=...): # -> Any:
        "Find the ascent (height above base) of the given font."
        ...
    
    def fontDescent(self, font=...): # -> Any:
        "Find the descent (extent below base) of the given font."
        ...
    
    def drawLine(self, x1, y1, x2, y2, color=..., width=..., dash=..., **kwargs): # -> None:
        "Draw a straight line between x1,y1 and x2,y2."
        ...
    
    def drawPolygon(self, pointlist, edgeColor=..., edgeWidth=..., fillColor=..., closed=..., dash=..., **kwargs): # -> None:
        """drawPolygon(pointlist) -- draws a polygon
        pointlist: a list of (x,y) tuples defining vertices
        """
        ...
    
    def drawString(self, s, x, y, font=..., color=..., angle=..., **kwargs): # -> None:
        "Draw a string starting at location x,y."
        ...
    
    def drawImage(self, image, x1, y1, x2=..., y2=..., **kwargs): # -> None:
        """Draw a PIL Image into the specified rectangle.  If x2 and y2 are
        omitted, they are calculated from the image size."""
        ...
    


def test(): # -> PILCanvas:
    ...

def testit(canvas, s, x, y, font=...): # -> None:
    ...

def test2(): # -> None:
    ...

if __name__ == '__main__':
    ...
