8000 WIP: code to compute bezier segment / path lengths · matplotlib/matplotlib@aca0710 · GitHub
[go: up one dir, main page]

Skip to content

Commit aca0710

Browse files
committed
WIP: code to compute bezier segment / path lengths
1 parent aebcbc7 commit aca0710

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
@@ -656,6 +656,9 @@ def intersects_bbox(self, bbox, filled=True):
656656
return _path.path_intersects_rectangle(
657657
self, bbox.x0, bbox.y0, bbox.x1, bbox.y1, filled)
658658

659+
def length(self, **kwargs):
660+
pass
661+
659662
def signed_area(self, **kwargs):
660663
"""
661664
Get signed area filled by path.

0 commit comments

Comments
 (0)
0