Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdd79d8

Browse files
committed
WIP: code to compute bezier segment / path lengths
1 parent 4c80f38 commit bdd79d8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/matplotlib/bezier.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ def point_at_t(self, t):
215215
"""Return the point on the Bezier curve for parameter *t*."""
216216
return tuple(self(t))
217217

218+
def arc_length(self, tol=1e-6):
219+
pass
220+
218221
def arc_area(self):
219222
r"""
220223
(Signed) area swept out by ray from origin to curve.

lib/matplotlib/path.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,9 @@ def intersects_bbox(self, bbox, filled=True):
654654
return _path.path_intersects_rectangle(
655655
self, bbox.x0, bbox.y0, bbox.x1, bbox.y1, filled)
656656

657+
def length(self, **kwargs):
658+
pass
659+
657660
def signed_area(self, **kwargs):
658661
"""
659662
Get signed area filled by path.

0 commit comments

Comments
 (0)