1 from collections.abc import Container
2 from typing import Any, Sequence, Tuple, Union, overload
3 from typing_extensions import Literal
5 from .Image import Image
6 from .ImageColor import _Ink
7 from .ImageFont import _Font
9 _XY = Sequence[Union[float, Tuple[float, float]]]
13 def __init__(self, im: Image, mode: str | None = ...) -> None: ...
14 def getfont(self): ...
15 def arc(self, xy: _XY, start: float, end: float, fill: _Ink | None = ..., width: float = ...) -> None: ...
16 def bitmap(self, xy: _XY, bitmap: Image, fill: _Ink | None = ...) -> None: ...
18 self, xy: _XY, start: float, end: float, fill: _Ink | None = ..., outline: _Ink | None = ..., width: float = ...
20 def ellipse(self, xy: _XY, fill: _Ink | None = ..., outline: _Ink | None = ..., width: float = ...) -> None: ...
21 def line(self, xy: _XY, fill: _Ink | None = ..., width: float = ..., joint: Literal["curve"] | None = ...) -> None: ...
22 def shape(self, shape: _Outline, fill: _Ink | None = ..., outline: _Ink | None = ...) -> None: ...
25 xy: tuple[tuple[float, float], tuple[float, float]],
28 fill: _Ink | None = ...,
29 outline: _Ink | None = ...,
32 def point(self, xy: _XY, fill: _Ink | None = ...) -> None: ...
33 def polygon(self, xy: _XY, fill: _Ink | None = ..., outline: _Ink | None = ...) -> None: ...
36 bounding_circle: tuple[float, float] | tuple[float, float, float] | list[int],
38 rotation: float = ...,
39 fill: _Ink | None = ...,
40 outline: _Ink | None = ...,
44 xy: tuple[float, float, float, float] | tuple[tuple[float, float], tuple[float, float]],
45 fill: _Ink | None = ...,
46 outline: _Ink | None = ...,
49 def rounded_rectangle(
51 xy: tuple[float, float, float, float] | tuple[tuple[float, float], tuple[float, float]],
53 fill: _Ink | None = ...,
54 outline: _Ink | None = ...,
59 xy: tuple[float, float],
61 fill: _Ink | None = ...,
62 font: _Font | None = ...,
63 anchor: str | None = ...,
65 align: Literal["left", "center", "right"] = ...,
66 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
67 features: Sequence[str] | None = ...,
68 language: str | None = ...,
69 stroke_width: int = ...,
70 stroke_fill: _Ink | None = ...,
71 embedded_color: bool = ...,
77 xy: tuple[float, float],
79 fill: _Ink | None = ...,
80 font: _Font | None = ...,
81 anchor: str | None = ...,
83 align: Literal["left", "center", "right"] = ...,
84 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
85 features: Any | None = ...,
86 language: str | None = ...,
87 stroke_width: int = ...,
88 stroke_fill: _Ink | None = ...,
89 embedded_color: bool = ...,
94 font: _Font | None = ...,
96 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
97 features: Sequence[str] | None = ...,
98 language: str | None = ...,
99 stroke_width: int = ...,
100 ) -> tuple[int, int]: ...
101 def multiline_textsize(
104 font: _Font | None = ...,
105 spacing: float = ...,
106 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
107 features: Sequence[str] | None = ...,
108 language: str | None = ...,
109 stroke_width: int = ...,
110 ) -> tuple[int, int]: ...
114 font: _Font | None = ...,
115 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
116 features: Sequence[str] | None = ...,
117 language: str | None = ...,
118 embedded_color: bool = ...,
122 xy: tuple[float, float],
124 font: _Font | None = ...,
125 anchor: str | None = ...,
126 spacing: float = ...,
127 align: Literal["left", "center", "right"] = ...,
128 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
129 features: Any | None = ...,
130 language: str | None = ...,
131 stroke_width: int = ...,
132 embedded_color: bool = ...,
133 ) -> tuple[int, int, int, int]: ...
134 def multiline_textbbox(
136 xy: tuple[float, float],
138 font: _Font | None = ...,
139 anchor: str | None = ...,
140 spacing: float = ...,
141 align: Literal["left", "center", "right"] = ...,
142 direction: Literal["rtl", "ltr", "ttb"] | None = ...,
143 features: Any | None = ...,
144 language: str | None = ...,
145 stroke_width: int = ...,
146 embedded_color: bool = ...,
147 ) -> tuple[int, int, int, int]: ...
149 def Draw(im: Image, mode: str | None = ...) -> ImageDraw: ...
150 def Outline() -> _Outline: ...
152 def getdraw(im: None = ..., hints: Container[Literal["nicest"]] | None = ...) -> tuple[None, Any]: ...
154 def getdraw(im: Image, hints: Container[Literal["nicest"]] | None = ...) -> tuple[Image, Any]: ...
155 def floodfill(image: Image, xy: tuple[float, float], value, border=..., thresh: float = ...) -> None: ...