@@ -81,15 +81,11 @@ def inside_circle(cx, cy, r):
81
81
82
82
f(xy: Tuple[float, float]) -> bool
83
83
"""
84
- r2 = r ** 2
84
+ from .patches import _inside_circle
85
+ return _inside_circle (cx , cy , r )
85
86
86
- def _f (xy ):
87
- x , y = xy
88
- return (x - cx ) ** 2 + (y - cy ) ** 2 < r2
89
- return _f
90
87
91
-
92
- @cbook .deprecated ("3.2" , alternative = "Path.make_compound_path()" )
88
+ @cbook .deprecated ("3.2" , alternative = "Path.split_path_inout()" )
93
89
def split_path_inout (path , inside , tolerance = 0.01 , reorder_inout = False ):
94
90
"""
95
91
Divide a path into two segments at the point where ``inside(x, y)``
@@ -98,24 +94,6 @@ def split_path_inout(path, inside, tolerance=0.01, reorder_inout=False):
98
94
return path .split_path_inout (inside , tolerance , reorder_inout )
99
95
100
96
101
- @cbook .deprecated (
102
- "3.2" , alternative = "Path.cleaned() and remove the final STOP if needed" )
103
- def make_path_regular (path ):
104
- """
105
- If the ``codes`` attribute of `.Path` *p* is None, return a copy of *p*
106
- with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
107
- return *p* itself.
108
- """
109
- return path .make_path_regular ()
110
-
111
-
112
- @cbook .deprecated ("3.2" , alternative = "Path.make_compound_path()" )
113
- def concatenate_paths (paths ):
114
- """Concatenate a list of paths into a single path."""
115
- from .path import Path
116
- return Path .make_compound_path (* paths )
117
-
118
-
119
97
# BEZIER routines
120
98
121
99
# subdividing bezier curve
@@ -445,3 +423,21 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):
445
423
c3x_right , c3y_right )
446
424
447
425
return path_left , path_right
426
+
427
+
428
+ @cbook .deprecated (
429
+ "3.2" , alternative = "Path.cleaned() and remove the final STOP if needed" )
430
+ def make_path_regular (path ):
431
+ """
432
+ If the ``codes`` attribute of `.Path` *p* is None, return a copy of *p*
433
+ with ``codes`` set to (MOVETO, LINETO, LINETO, ..., LINETO); otherwise
434
+ return *p* itself.
435
+ """
436
+ return path .make_path_regular ()
437
+
438
+
439
+ @cbook .deprecated ("3.2" , alternative = "Path.make_compound_path()" )
440
+ def concatenate_paths (paths ):
441
+ """Concatenate a list of paths into a single path."""
442
+ from .path import Path
443
+ return Path .make_compound_path (* paths )
0 commit comments