platypush/plugins/luma/oled/__init__.py
def polygon(self, xy: Optional[Union[Tuple[int], List[int]]] = None,
                fill: Optional[str] = None, outline: Optional[str] = None,
                clear: bool = False):
        """
        Draw a polygon on the canvas.

        :param xy: Sequence of either 2-tuples like [(x, y), (x, y), ...] or numeric values like [x, y, x, y, ...].
        :param fill: Fill color - can be ``black`` or ``white``.
        :param outline: Outline color - can be ``black`` or ``white``.
        :param clear: Set to True if you want to clear the canvas before writing the text (default: False).
        """
        if clear:
            self.clear()

        if not xy:
            xy = self.device.bounding_box

        with self.canvas as draw:
            draw.polygon(xy, outline=outline, fill=fill)

        Draw a polygon on the canvas.

        :param xy: Sequence of either 2-tuples like [(x, y), (x, y), ...] or numeric values like [x, y, x, y, ...].
        :param fill: Fill color - can be ``black`` or ``white``.
        :param outline: Outline color - can be ``black`` or ``white``.
        :param clear: Set to True if you want to clear the canvas before writing the text (default: False).
        
Draw a polygon on the canvas.
Draw a polygon on the canvas .
def polygon(self, xy: Optional[Union[Tuple[int], List[int]]] = None,
                fill: Optional[str] = None, outline: Optional[str] = None,
                clear: bool = False):
        if clear:
            self.clear()
        if not xy:
            xy = self.device.bounding_box
        with self.canvas as draw:
            draw.polygon(xy, outline=outline, fill=fill)
def polygon ( self , xy : Optional [ Union [ Tuple [ int ] , List [ int ] ] ] = None , fill : Optional [ str ] = None , outline : Optional [ str ] = None , clear : bool = False ) : if clear : self . clear ( ) if not xy : xy = self . device . bounding_box with self . canvas as draw : draw . polygon ( xy , outline = outline , fill = fill )
Draw a polygon on the canvas.
Draw a polygon on the canvas .
"""
        Draw a polygon on the canvas.

        :param xy: Sequence of either 2-tuples like [(x, y), (x, y), ...] or numeric values like [x, y, x, y, ...].
        :param fill: Fill color - can be ``black`` or ``white``.
        :param outline: Outline color - can be ``black`` or ``white``.
        :param clear: Set to True if you want to clear the canvas before writing the text (default: False).
        """
self
xy
Optional[Union[Tuple[int], List[int]]]
Sequence of either 2-tuples like [(x, y), (x, y), ...] or numeric values like [x, y, x, y, ...].
Sequence of either 2 - tuples like [ ( x y ) ( x y ) ... ] or numeric values like [ x y x y ... ] .
fill
Optional[str]
Fill color - can be ``black`` or ``white``.
Fill color - can be ` ` black ` ` or ` ` white ` ` .
outline
Optional[str]
Outline color - can be ``black`` or ``white``.
Outline color - can be ` ` black ` ` or ` ` white ` ` .
clear
bool
Set to True if you want to clear the canvas before writing the text (default: False).
Set to True if you want to clear the canvas before writing the text ( default : False ) .