Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1bde349

Browse files
committed
make footprint of changes smaller
1 parentfbc95f8 commit1bde349

File tree

1 file changed

+33
-37
lines changed

1 file changed

+33
-37
lines changed

‎lib/matplotlib/bezier.py

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -71,25 +71,7 @@ def get_normal_points(cx, cy, cos_t, sin_t, length):
7171
# deprecated routines (moved to `.Path`)
7272

7373

74-
@cbook.deprecated("3.2")
75-
definside_circle(cx,cy,r):
76-
"""
77-
Return a function that checks whether a point is in a circle with center
78-
(*cx*, *cy*) and radius *r*.
79-
80-
The returned function has the signature::
81-
82-
f(xy: Tuple[float, float]) -> bool
83-
"""
84-
r2=r**2
85-
86-
def_f(xy):
87-
x,y=xy
88-
return (x-cx)**2+ (y-cy)**2<r2
89-
return_f
90-
91-
92-
@cbook.deprecated("3.2",alternative="Path.make_compound_path()")
74+
@cbook.deprecated("3.2",alternative="Path.split_path_inout()")
9375
defsplit_path_inout(path,inside,tolerance=0.01,reorder_inout=False):
9476
"""
9577
Divide a path into two segments at the point where ``inside(x, y)``
@@ -98,24 +80,6 @@ def split_path_inout(path, inside, tolerance=0.01, reorder_inout=False):
9880
returnpath.split_path_inout(inside,tolerance,reorder_inout)
9981

10082

101-
@cbook.deprecated(
102-
"3.2",alternative="Path.cleaned() and remove the final STOP if needed")
103-
defmake_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-
returnpath.make_path_regular()
110-
111-
112-
@cbook.deprecated("3.2",alternative="Path.make_compound_path()")
113-
defconcatenate_paths(paths):
114-
"""Concatenate a list of paths into a single path."""
115-
from .pathimportPath
116-
returnPath.make_compound_path(*paths)
117-
118-
11983
# BEZIER routines
12084

12185
# subdividing bezier curve
@@ -270,6 +234,20 @@ def split_bezier_intersecting_with_closedpath(
270234
return_left,_right
271235

272236

237+
@cbook.deprecated("3.2")
238+
definside_circle(cx,cy,r):
239+
"""
240+
Return a function that checks whether a point is in a circle with center
241+
(*cx*, *cy*) and radius *r*.
242+
243+
The returned function has the signature::
244+
245+
f(xy: Tuple[float, float]) -> bool
246+
"""
247+
from .patchesimport_inside_circle
248+
return_inside_circle(cx,cy,r)
249+
250+
273251
# quadratic Bezier lines
274252

275253

@@ -445,3 +423,21 @@ def make_wedged_bezier2(bezier2, width, w1=1., wm=0.5, w2=0.):
445423
c3x_right,c3y_right)
446424

447425
returnpath_left,path_right
426+
427+
428+
@cbook.deprecated(
429+
"3.2",alternative="Path.cleaned() and remove the final STOP if needed")
430+
defmake_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+
returnpath.make_path_regular()
437+
438+
439+
@cbook.deprecated("3.2",alternative="Path.make_compound_path()")
440+
defconcatenate_paths(paths):
441+
"""Concatenate a list of paths into a single path."""
442+
from .pathimportPath
443+
returnPath.make_compound_path(*paths)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp