forked from bschnurr/python-type-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpath.pyi
More file actions
135 lines (131 loc) · 3.97 KB
/
Copy pathpath.pyi
File metadata and controls
135 lines (131 loc) · 3.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
import numpy as np
from typing import Sequence
from ._typing import *
from .transforms import Affine2D, Bbox, Transform
from functools import lru_cache
class Path:
code_type = np.uint8
STOP = code_type(0)
MOVETO = code_type(1)
LINETO = code_type(2)
CURVE3 = code_type(3)
CURVE4 = code_type(4)
CLOSEPOLY = code_type(79)
NUM_VERTICES_FOR_CODE = ...
def __init__(
self,
vertices: ArrayLike,
codes: ArrayLike | None = ...,
_interpolation_steps: int = ...,
closed: bool = ...,
readonly: bool = ...,
) -> None: ...
@property
def vertices(self) -> np.ndarray: ...
@vertices.setter
def vertices(self, vertices: ArrayLike): ...
@property
def codes(self) -> np.ndarray: ...
@codes.setter
def codes(self, codes: ArrayLike): ...
@property
def simplify_threshold(self): ...
@simplify_threshold.setter
def simplify_threshold(self, threshold): ...
@property
def should_simplify(self) -> bool: ...
@should_simplify.setter
def should_simplify(self, should_simplify: bool): ...
@property
def readonly(self) -> bool: ...
def copy(self) -> Path: ...
def __deepcopy__(self, memo=...) -> Path: ...
deepcopy = ...
@classmethod
def make_compound_path_from_polys(cls, XY): ...
@classmethod
def make_compound_path(cls, *args): ...
def __repr__(self): ...
def __len__(self): ...
def iter_segments(
self,
transform: None = ...,
remove_nans: bool = ...,
clip: None | float | float = ...,
snap: None | bool = ...,
stroke_width: float = ...,
simplify: None | bool = ...,
curves: bool = ...,
sketch: None | Sequence = ...,
): ...
def iter_bezier(self, **kwargs): ...
def cleaned(
self,
transform: Transform = ...,
remove_nans=...,
clip=...,
*,
simplify=...,
curves=...,
stroke_width: float = ...,
snap=...,
sketch=...
): ...
def transformed(self, transform) -> Path: ...
def contains_point(
self,
point: Sequence[float],
transform: Transform = ...,
radius: float = ...,
) -> bool: ...
def contains_points(
self, points: ArrayLike, transform: Transform = ..., radius: float = ...
) -> list[bool]: ...
def contains_path(self, path: Path, transform: Transform = ...) -> bool: ...
def get_extents(self, transform: Transform = ..., **kwargs) -> Bbox: ...
def intersects_path(self, other: Path, filled: bool = ...) -> bool: ...
def intersects_bbox(self, bbox: Bbox, filled: bool = ...): ...
def interpolated(self, steps): ...
def to_polygons(
self,
transform: Transform = ...,
width: float = ...,
height: float = ...,
closed_only: bool = ...,
): ...
@classmethod
def unit_rectangle(cls) -> Path: ...
@classmethod
def unit_regular_polygon(cls, numVertices: int) -> Path: ...
@classmethod
def unit_regular_star(cls, numVertices: int, innerCircle=...) -> Path: ...
@classmethod
def unit_regular_asterisk(cls, numVertices: int) -> Path: ...
@classmethod
def unit_circle(cls) -> Path: ...
@classmethod
def circle(
cls,
center: Sequence[float] = ...,
radius: float = ...,
readonly: bool = ...,
) -> Path: ...
@classmethod
def unit_circle_righthalf(cls) -> Path: ...
@classmethod
def arc(
cls, theta1: float, theta2: float, n: int = ..., is_wedge: bool = ...
) -> Path: ...
@classmethod
def wedge(cls, theta1: float, theta2: float, n: int = ...) -> Path: ...
@staticmethod
@lru_cache(8)
def hatch(hatchpattern, density: float = ...): ...
def clip_to_bbox(self, bbox: Bbox, inside: bool = ...): ...
def get_path_collection_extents(
master_transform: Transform,
paths: Sequence[Path],
transforms: list,
offsets,
offset_transform: Affine2D,
) -> Bbox: ...