patches.pyi 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757
  1. from . import artist
  2. from .axes import Axes
  3. from .backend_bases import RendererBase, MouseEvent
  4. from .path import Path
  5. from .transforms import Transform, Bbox
  6. from typing import Any, Literal, overload
  7. import numpy as np
  8. from numpy.typing import ArrayLike
  9. from .typing import ColorType, LineStyleType, CapStyleType, JoinStyleType
  10. class Patch(artist.Artist):
  11. zorder: float
  12. def __init__(
  13. self,
  14. *,
  15. edgecolor: ColorType | None = ...,
  16. facecolor: ColorType | None = ...,
  17. color: ColorType | None = ...,
  18. linewidth: float | None = ...,
  19. linestyle: LineStyleType | None = ...,
  20. antialiased: bool | None = ...,
  21. hatch: str | None = ...,
  22. fill: bool = ...,
  23. capstyle: CapStyleType | None = ...,
  24. joinstyle: JoinStyleType | None = ...,
  25. **kwargs,
  26. ) -> None: ...
  27. def get_verts(self) -> ArrayLike: ...
  28. def contains(self, mouseevent: MouseEvent, radius: float | None = None) -> tuple[bool, dict[Any, Any]]: ...
  29. def contains_point(
  30. self, point: tuple[float, float], radius: float | None = ...
  31. ) -> bool: ...
  32. def contains_points(
  33. self, points: ArrayLike, radius: float | None = ...
  34. ) -> np.ndarray: ...
  35. def get_extents(self) -> Bbox: ...
  36. def get_transform(self) -> Transform: ...
  37. def get_data_transform(self) -> Transform: ...
  38. def get_patch_transform(self) -> Transform: ...
  39. def get_antialiased(self) -> bool: ...
  40. def get_edgecolor(self) -> ColorType: ...
  41. def get_facecolor(self) -> ColorType: ...
  42. def get_linewidth(self) -> float: ...
  43. def get_linestyle(self) -> LineStyleType: ...
  44. def set_antialiased(self, aa: bool | None) -> None: ...
  45. def set_edgecolor(self, color: ColorType | None) -> None: ...
  46. def set_facecolor(self, color: ColorType | None) -> None: ...
  47. def set_color(self, c: ColorType | None) -> None: ...
  48. def set_alpha(self, alpha: float | None) -> None: ...
  49. def set_linewidth(self, w: float | None) -> None: ...
  50. def set_linestyle(self, ls: LineStyleType | None) -> None: ...
  51. def set_fill(self, b: bool) -> None: ...
  52. def get_fill(self) -> bool: ...
  53. fill = property(get_fill, set_fill)
  54. def set_capstyle(self, s: CapStyleType) -> None: ...
  55. def get_capstyle(self) -> Literal["butt", "projecting", "round"]: ...
  56. def set_joinstyle(self, s: JoinStyleType) -> None: ...
  57. def get_joinstyle(self) -> Literal["miter", "round", "bevel"]: ...
  58. def set_hatch(self, hatch: str) -> None: ...
  59. def set_hatch_linewidth(self, lw: float) -> None: ...
  60. def get_hatch_linewidth(self) -> float: ...
  61. def get_hatch(self) -> str: ...
  62. def get_path(self) -> Path: ...
  63. class Shadow(Patch):
  64. patch: Patch
  65. def __init__(self, patch: Patch, ox: float, oy: float, *, shade: float = ..., **kwargs) -> None: ...
  66. class Rectangle(Patch):
  67. angle: float
  68. def __init__(
  69. self,
  70. xy: tuple[float, float],
  71. width: float,
  72. height: float,
  73. *,
  74. angle: float = ...,
  75. rotation_point: Literal["xy", "center"] | tuple[float, float] = ...,
  76. **kwargs,
  77. ) -> None: ...
  78. @property
  79. def rotation_point(self) -> Literal["xy", "center"] | tuple[float, float]: ...
  80. @rotation_point.setter
  81. def rotation_point(
  82. self, value: Literal["xy", "center"] | tuple[float, float]
  83. ) -> None: ...
  84. def get_x(self) -> float: ...
  85. def get_y(self) -> float: ...
  86. def get_xy(self) -> tuple[float, float]: ...
  87. def get_corners(self) -> np.ndarray: ...
  88. def get_center(self) -> np.ndarray: ...
  89. def get_width(self) -> float: ...
  90. def get_height(self) -> float: ...
  91. def get_angle(self) -> float: ...
  92. def set_x(self, x: float) -> None: ...
  93. def set_y(self, y: float) -> None: ...
  94. def set_angle(self, angle: float) -> None: ...
  95. def set_xy(self, xy: tuple[float, float]) -> None: ...
  96. def set_width(self, w: float) -> None: ...
  97. def set_height(self, h: float) -> None: ...
  98. @overload
  99. def set_bounds(self, args: tuple[float, float, float, float], /) -> None: ...
  100. @overload
  101. def set_bounds(
  102. self, left: float, bottom: float, width: float, height: float, /
  103. ) -> None: ...
  104. def get_bbox(self) -> Bbox: ...
  105. xy = property(get_xy, set_xy)
  106. class RegularPolygon(Patch):
  107. xy: tuple[float, float]
  108. numvertices: int
  109. orientation: float
  110. radius: float
  111. def __init__(
  112. self,
  113. xy: tuple[float, float],
  114. numVertices: int,
  115. *,
  116. radius: float = ...,
  117. orientation: float = ...,
  118. **kwargs,
  119. ) -> None: ...
  120. class PathPatch(Patch):
  121. def __init__(self, path: Path, **kwargs) -> None: ...
  122. def set_path(self, path: Path) -> None: ...
  123. class StepPatch(PathPatch):
  124. orientation: Literal["vertical", "horizontal"]
  125. def __init__(
  126. self,
  127. values: ArrayLike,
  128. edges: ArrayLike,
  129. *,
  130. orientation: Literal["vertical", "horizontal"] = ...,
  131. baseline: float = ...,
  132. **kwargs,
  133. ) -> None: ...
  134. # NamedTuple StairData, defined in body of method
  135. def get_data(self) -> tuple[np.ndarray, np.ndarray, float]: ...
  136. def set_data(
  137. self,
  138. values: ArrayLike | None = ...,
  139. edges: ArrayLike | None = ...,
  140. baseline: float | None = ...,
  141. ) -> None: ...
  142. class Polygon(Patch):
  143. def __init__(self, xy: ArrayLike, *, closed: bool = ..., **kwargs) -> None: ...
  144. def get_closed(self) -> bool: ...
  145. def set_closed(self, closed: bool) -> None: ...
  146. def get_xy(self) -> np.ndarray: ...
  147. def set_xy(self, xy: ArrayLike) -> None: ...
  148. xy = property(get_xy, set_xy)
  149. class Wedge(Patch):
  150. center: tuple[float, float]
  151. r: float
  152. theta1: float
  153. theta2: float
  154. width: float | None
  155. def __init__(
  156. self,
  157. center: tuple[float, float],
  158. r: float,
  159. theta1: float,
  160. theta2: float,
  161. *,
  162. width: float | None = ...,
  163. **kwargs,
  164. ) -> None: ...
  165. def set_center(self, center: tuple[float, float]) -> None: ...
  166. def set_radius(self, radius: float) -> None: ...
  167. def set_theta1(self, theta1: float) -> None: ...
  168. def set_theta2(self, theta2: float) -> None: ...
  169. def set_width(self, width: float | None) -> None: ...
  170. class Arrow(Patch):
  171. def __init__(
  172. self, x: float, y: float, dx: float, dy: float, *, width: float = ..., **kwargs
  173. ) -> None: ...
  174. def set_data(
  175. self,
  176. x: float | None = ...,
  177. y: float | None = ...,
  178. dx: float | None = ...,
  179. dy: float | None = ...,
  180. width: float | None = ...,
  181. ) -> None: ...
  182. class FancyArrow(Polygon):
  183. def __init__(
  184. self,
  185. x: float,
  186. y: float,
  187. dx: float,
  188. dy: float,
  189. *,
  190. width: float = ...,
  191. length_includes_head: bool = ...,
  192. head_width: float | None = ...,
  193. head_length: float | None = ...,
  194. shape: Literal["full", "left", "right"] = ...,
  195. overhang: float = ...,
  196. head_starts_at_zero: bool = ...,
  197. **kwargs,
  198. ) -> None: ...
  199. def set_data(
  200. self,
  201. *,
  202. x: float | None = ...,
  203. y: float | None = ...,
  204. dx: float | None = ...,
  205. dy: float | None = ...,
  206. width: float | None = ...,
  207. head_width: float | None = ...,
  208. head_length: float | None = ...,
  209. ) -> None: ...
  210. class CirclePolygon(RegularPolygon):
  211. def __init__(
  212. self,
  213. xy: tuple[float, float],
  214. radius: float = ...,
  215. *,
  216. resolution: int = ...,
  217. **kwargs,
  218. ) -> None: ...
  219. class Ellipse(Patch):
  220. def __init__(
  221. self,
  222. xy: tuple[float, float],
  223. width: float,
  224. height: float,
  225. *,
  226. angle: float = ...,
  227. **kwargs,
  228. ) -> None: ...
  229. def set_center(self, xy: tuple[float, float]) -> None: ...
  230. def get_center(self) -> float: ...
  231. center = property(get_center, set_center)
  232. def set_width(self, width: float) -> None: ...
  233. def get_width(self) -> float: ...
  234. width = property(get_width, set_width)
  235. def set_height(self, height: float) -> None: ...
  236. def get_height(self) -> float: ...
  237. height = property(get_height, set_height)
  238. def set_angle(self, angle: float) -> None: ...
  239. def get_angle(self) -> float: ...
  240. angle = property(get_angle, set_angle)
  241. def get_corners(self) -> np.ndarray: ...
  242. def get_vertices(self) -> list[tuple[float, float]]: ...
  243. def get_co_vertices(self) -> list[tuple[float, float]]: ...
  244. class Annulus(Patch):
  245. a: float
  246. b: float
  247. def __init__(
  248. self,
  249. xy: tuple[float, float],
  250. r: float | tuple[float, float],
  251. width: float,
  252. angle: float = ...,
  253. **kwargs,
  254. ) -> None: ...
  255. def set_center(self, xy: tuple[float, float]) -> None: ...
  256. def get_center(self) -> tuple[float, float]: ...
  257. center = property(get_center, set_center)
  258. def set_width(self, width: float) -> None: ...
  259. def get_width(self) -> float: ...
  260. width = property(get_width, set_width)
  261. def set_angle(self, angle: float) -> None: ...
  262. def get_angle(self) -> float: ...
  263. angle = property(get_angle, set_angle)
  264. def set_semimajor(self, a: float) -> None: ...
  265. def set_semiminor(self, b: float) -> None: ...
  266. def set_radii(self, r: float | tuple[float, float]) -> None: ...
  267. def get_radii(self) -> tuple[float, float]: ...
  268. radii = property(get_radii, set_radii)
  269. class Circle(Ellipse):
  270. def __init__(
  271. self, xy: tuple[float, float], radius: float = ..., **kwargs
  272. ) -> None: ...
  273. def set_radius(self, radius: float) -> None: ...
  274. def get_radius(self) -> float: ...
  275. radius = property(get_radius, set_radius)
  276. class Arc(Ellipse):
  277. theta1: float
  278. theta2: float
  279. def __init__(
  280. self,
  281. xy: tuple[float, float],
  282. width: float,
  283. height: float,
  284. *,
  285. angle: float = ...,
  286. theta1: float = ...,
  287. theta2: float = ...,
  288. **kwargs,
  289. ) -> None: ...
  290. def bbox_artist(
  291. artist: artist.Artist,
  292. renderer: RendererBase,
  293. props: dict[str, Any] | None = ...,
  294. fill: bool = ...,
  295. ) -> None: ...
  296. def draw_bbox(
  297. bbox: Bbox,
  298. renderer: RendererBase,
  299. color: ColorType = ...,
  300. trans: Transform | None = ...,
  301. ) -> None: ...
  302. class _Style:
  303. def __new__(cls, stylename, **kwargs): ...
  304. @classmethod
  305. def get_styles(cls) -> dict[str, type]: ...
  306. @classmethod
  307. def pprint_styles(cls) -> str: ...
  308. @classmethod
  309. def register(cls, name: str, style: type) -> None: ...
  310. class BoxStyle(_Style):
  311. class Square(BoxStyle):
  312. pad: float
  313. def __init__(self, pad: float = ...) -> None: ...
  314. def __call__(
  315. self,
  316. x0: float,
  317. y0: float,
  318. width: float,
  319. height: float,
  320. mutation_size: float,
  321. ) -> Path: ...
  322. class Circle(BoxStyle):
  323. pad: float
  324. def __init__(self, pad: float = ...) -> None: ...
  325. def __call__(
  326. self,
  327. x0: float,
  328. y0: float,
  329. width: float,
  330. height: float,
  331. mutation_size: float,
  332. ) -> Path: ...
  333. class Ellipse(BoxStyle):
  334. pad: float
  335. def __init__(self, pad: float = ...) -> None: ...
  336. def __call__(
  337. self,
  338. x0: float,
  339. y0: float,
  340. width: float,
  341. height: float,
  342. mutation_size: float,
  343. ) -> Path: ...
  344. class LArrow(BoxStyle):
  345. pad: float
  346. def __init__(self, pad: float = ...) -> None: ...
  347. def __call__(
  348. self,
  349. x0: float,
  350. y0: float,
  351. width: float,
  352. height: float,
  353. mutation_size: float,
  354. ) -> Path: ...
  355. class RArrow(LArrow):
  356. def __call__(
  357. self,
  358. x0: float,
  359. y0: float,
  360. width: float,
  361. height: float,
  362. mutation_size: float,
  363. ) -> Path: ...
  364. class DArrow(BoxStyle):
  365. pad: float
  366. def __init__(self, pad: float = ...) -> None: ...
  367. def __call__(
  368. self,
  369. x0: float,
  370. y0: float,
  371. width: float,
  372. height: float,
  373. mutation_size: float,
  374. ) -> Path: ...
  375. class Round(BoxStyle):
  376. pad: float
  377. rounding_size: float | None
  378. def __init__(
  379. self, pad: float = ..., rounding_size: float | None = ...
  380. ) -> None: ...
  381. def __call__(
  382. self,
  383. x0: float,
  384. y0: float,
  385. width: float,
  386. height: float,
  387. mutation_size: float,
  388. ) -> Path: ...
  389. class Round4(BoxStyle):
  390. pad: float
  391. rounding_size: float | None
  392. def __init__(
  393. self, pad: float = ..., rounding_size: float | None = ...
  394. ) -> None: ...
  395. def __call__(
  396. self,
  397. x0: float,
  398. y0: float,
  399. width: float,
  400. height: float,
  401. mutation_size: float,
  402. ) -> Path: ...
  403. class Sawtooth(BoxStyle):
  404. pad: float
  405. tooth_size: float | None
  406. def __init__(
  407. self, pad: float = ..., tooth_size: float | None = ...
  408. ) -> None: ...
  409. def __call__(
  410. self,
  411. x0: float,
  412. y0: float,
  413. width: float,
  414. height: float,
  415. mutation_size: float,
  416. ) -> Path: ...
  417. class Roundtooth(Sawtooth):
  418. def __call__(
  419. self,
  420. x0: float,
  421. y0: float,
  422. width: float,
  423. height: float,
  424. mutation_size: float,
  425. ) -> Path: ...
  426. class ConnectionStyle(_Style):
  427. class _Base(ConnectionStyle):
  428. def __call__(
  429. self,
  430. posA: tuple[float, float],
  431. posB: tuple[float, float],
  432. shrinkA: float = ...,
  433. shrinkB: float = ...,
  434. patchA: Patch | None = ...,
  435. patchB: Patch | None = ...,
  436. ) -> Path: ...
  437. class Arc3(_Base):
  438. rad: float
  439. def __init__(self, rad: float = ...) -> None: ...
  440. def connect(
  441. self, posA: tuple[float, float], posB: tuple[float, float]
  442. ) -> Path: ...
  443. class Angle3(_Base):
  444. angleA: float
  445. angleB: float
  446. def __init__(self, angleA: float = ..., angleB: float = ...) -> None: ...
  447. def connect(
  448. self, posA: tuple[float, float], posB: tuple[float, float]
  449. ) -> Path: ...
  450. class Angle(_Base):
  451. angleA: float
  452. angleB: float
  453. rad: float
  454. def __init__(
  455. self, angleA: float = ..., angleB: float = ..., rad: float = ...
  456. ) -> None: ...
  457. def connect(
  458. self, posA: tuple[float, float], posB: tuple[float, float]
  459. ) -> Path: ...
  460. class Arc(_Base):
  461. angleA: float
  462. angleB: float
  463. armA: float | None
  464. armB: float | None
  465. rad: float
  466. def __init__(
  467. self,
  468. angleA: float = ...,
  469. angleB: float = ...,
  470. armA: float | None = ...,
  471. armB: float | None = ...,
  472. rad: float = ...,
  473. ) -> None: ...
  474. def connect(
  475. self, posA: tuple[float, float], posB: tuple[float, float]
  476. ) -> Path: ...
  477. class Bar(_Base):
  478. armA: float
  479. armB: float
  480. fraction: float
  481. angle: float | None
  482. def __init__(
  483. self,
  484. armA: float = ...,
  485. armB: float = ...,
  486. fraction: float = ...,
  487. angle: float | None = ...,
  488. ) -> None: ...
  489. def connect(
  490. self, posA: tuple[float, float], posB: tuple[float, float]
  491. ) -> Path: ...
  492. class ArrowStyle(_Style):
  493. class _Base(ArrowStyle):
  494. @staticmethod
  495. def ensure_quadratic_bezier(path: Path) -> list[float]: ...
  496. def transmute(
  497. self, path: Path, mutation_size: float, linewidth: float
  498. ) -> tuple[Path, bool]: ...
  499. def __call__(
  500. self,
  501. path: Path,
  502. mutation_size: float,
  503. linewidth: float,
  504. aspect_ratio: float = ...,
  505. ) -> tuple[Path, bool]: ...
  506. class _Curve(_Base):
  507. arrow: str
  508. fillbegin: bool
  509. fillend: bool
  510. def __init__(
  511. self,
  512. head_length: float = ...,
  513. head_width: float = ...,
  514. widthA: float = ...,
  515. widthB: float = ...,
  516. lengthA: float = ...,
  517. lengthB: float = ...,
  518. angleA: float | None = ...,
  519. angleB: float | None = ...,
  520. scaleA: float | None = ...,
  521. scaleB: float | None = ...,
  522. ) -> None: ...
  523. class Curve(_Curve):
  524. def __init__(self) -> None: ...
  525. class CurveA(_Curve):
  526. arrow: str
  527. class CurveB(_Curve):
  528. arrow: str
  529. class CurveAB(_Curve):
  530. arrow: str
  531. class CurveFilledA(_Curve):
  532. arrow: str
  533. class CurveFilledB(_Curve):
  534. arrow: str
  535. class CurveFilledAB(_Curve):
  536. arrow: str
  537. class BracketA(_Curve):
  538. arrow: str
  539. def __init__(
  540. self, widthA: float = ..., lengthA: float = ..., angleA: float = ...
  541. ) -> None: ...
  542. class BracketB(_Curve):
  543. arrow: str
  544. def __init__(
  545. self, widthB: float = ..., lengthB: float = ..., angleB: float = ...
  546. ) -> None: ...
  547. class BracketAB(_Curve):
  548. arrow: str
  549. def __init__(
  550. self,
  551. widthA: float = ...,
  552. lengthA: float = ...,
  553. angleA: float = ...,
  554. widthB: float = ...,
  555. lengthB: float = ...,
  556. angleB: float = ...,
  557. ) -> None: ...
  558. class BarAB(_Curve):
  559. arrow: str
  560. def __init__(
  561. self,
  562. widthA: float = ...,
  563. angleA: float = ...,
  564. widthB: float = ...,
  565. angleB: float = ...,
  566. ) -> None: ...
  567. class BracketCurve(_Curve):
  568. arrow: str
  569. def __init__(
  570. self, widthA: float = ..., lengthA: float = ..., angleA: float | None = ...
  571. ) -> None: ...
  572. class CurveBracket(_Curve):
  573. arrow: str
  574. def __init__(
  575. self, widthB: float = ..., lengthB: float = ..., angleB: float | None = ...
  576. ) -> None: ...
  577. class Simple(_Base):
  578. def __init__(
  579. self,
  580. head_length: float = ...,
  581. head_width: float = ...,
  582. tail_width: float = ...,
  583. ) -> None: ...
  584. class Fancy(_Base):
  585. def __init__(
  586. self,
  587. head_length: float = ...,
  588. head_width: float = ...,
  589. tail_width: float = ...,
  590. ) -> None: ...
  591. class Wedge(_Base):
  592. tail_width: float
  593. shrink_factor: float
  594. def __init__(
  595. self, tail_width: float = ..., shrink_factor: float = ...
  596. ) -> None: ...
  597. class FancyBboxPatch(Patch):
  598. def __init__(
  599. self,
  600. xy: tuple[float, float],
  601. width: float,
  602. height: float,
  603. boxstyle: str | BoxStyle = ...,
  604. *,
  605. mutation_scale: float = ...,
  606. mutation_aspect: float = ...,
  607. **kwargs,
  608. ) -> None: ...
  609. def set_boxstyle(self, boxstyle: str | BoxStyle | None = ..., **kwargs) -> None: ...
  610. def get_boxstyle(self) -> BoxStyle: ...
  611. def set_mutation_scale(self, scale: float) -> None: ...
  612. def get_mutation_scale(self) -> float: ...
  613. def set_mutation_aspect(self, aspect: float) -> None: ...
  614. def get_mutation_aspect(self) -> float: ...
  615. def get_x(self) -> float: ...
  616. def get_y(self) -> float: ...
  617. def get_width(self) -> float: ...
  618. def get_height(self) -> float: ...
  619. def set_x(self, x: float) -> None: ...
  620. def set_y(self, y: float) -> None: ...
  621. def set_width(self, w: float) -> None: ...
  622. def set_height(self, h: float) -> None: ...
  623. @overload
  624. def set_bounds(self, args: tuple[float, float, float, float], /) -> None: ...
  625. @overload
  626. def set_bounds(
  627. self, left: float, bottom: float, width: float, height: float, /
  628. ) -> None: ...
  629. def get_bbox(self) -> Bbox: ...
  630. class FancyArrowPatch(Patch):
  631. patchA: Patch
  632. patchB: Patch
  633. shrinkA: float
  634. shrinkB: float
  635. def __init__(
  636. self,
  637. posA: tuple[float, float] | None = ...,
  638. posB: tuple[float, float] | None = ...,
  639. *,
  640. path: Path | None = ...,
  641. arrowstyle: str | ArrowStyle = ...,
  642. connectionstyle: str | ConnectionStyle = ...,
  643. patchA: Patch | None = ...,
  644. patchB: Patch | None = ...,
  645. shrinkA: float = ...,
  646. shrinkB: float = ...,
  647. mutation_scale: float = ...,
  648. mutation_aspect: float | None = ...,
  649. **kwargs,
  650. ) -> None: ...
  651. def set_positions(
  652. self, posA: tuple[float, float], posB: tuple[float, float]
  653. ) -> None: ...
  654. def set_patchA(self, patchA: Patch) -> None: ...
  655. def set_patchB(self, patchB: Patch) -> None: ...
  656. def set_connectionstyle(self, connectionstyle: str | ConnectionStyle | None = ..., **kwargs) -> None: ...
  657. def get_connectionstyle(self) -> ConnectionStyle: ...
  658. def set_arrowstyle(self, arrowstyle: str | ArrowStyle | None = ..., **kwargs) -> None: ...
  659. def get_arrowstyle(self) -> ArrowStyle: ...
  660. def set_mutation_scale(self, scale: float) -> None: ...
  661. def get_mutation_scale(self) -> float: ...
  662. def set_mutation_aspect(self, aspect: float | None) -> None: ...
  663. def get_mutation_aspect(self) -> float: ...
  664. class ConnectionPatch(FancyArrowPatch):
  665. xy1: tuple[float, float]
  666. xy2: tuple[float, float]
  667. coords1: str | Transform
  668. coords2: str | Transform | None
  669. axesA: Axes | None
  670. axesB: Axes | None
  671. def __init__(
  672. self,
  673. xyA: tuple[float, float],
  674. xyB: tuple[float, float],
  675. coordsA: str | Transform,
  676. coordsB: str | Transform | None = ...,
  677. *,
  678. axesA: Axes | None = ...,
  679. axesB: Axes | None = ...,
  680. arrowstyle: str | ArrowStyle = ...,
  681. connectionstyle: str | ConnectionStyle = ...,
  682. patchA: Patch | None = ...,
  683. patchB: Patch | None = ...,
  684. shrinkA: float = ...,
  685. shrinkB: float = ...,
  686. mutation_scale: float = ...,
  687. mutation_aspect: float | None = ...,
  688. clip_on: bool = ...,
  689. **kwargs,
  690. ) -> None: ...
  691. def set_annotation_clip(self, b: bool | None) -> None: ...
  692. def get_annotation_clip(self) -> bool | None: ...