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

Commit a8e290a

Browse files
Remove unused python update_path_extents
1 parent 28d03bf commit a8e290a

File tree

2 files changed

+0
-61
lines changed

2 files changed

+0
-61
lines changed

‎lib/matplotlib/_path.pyi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ from .transforms import BboxBase
66

77
def affine_transform(points: np.ndarray, trans: np.ndarray) -> np.ndarray: ...
88
def count_bboxes_overlapping_bbox(bbox: BboxBase, bboxes: Sequence[BboxBase]) -> int: ...
9-
def update_path_extents(path, trans, rect, minpos, ignore): ...

‎src/_path_wrapper.cpp‎

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -52,64 +52,6 @@ Py_points_in_path(py::array_t<double> points_obj, double r, mpl::PathIterator pa
5252
return results;
5353
}
5454

55-
static py::tuple
56-
Py_update_path_extents(mpl::PathIterator path, agg::trans_affine trans,
57-
agg::rect_d rect, py::array_t<double> minpos, bool ignore)
58-
{
59-
bool changed;
60-
61-
if (minpos.ndim() != 1) {
62-
throw py::value_error(
63-
"minpos must be 1D, got " + std::to_string(minpos.ndim()));
64-
}
65-
if (minpos.shape(0) != 2) {
66-
throw py::value_error(
67-
"minpos must be of length 2, got " + std::to_string(minpos.shape(0)));
68-
}
69-
70-
extent_limits e;
71-
72-
if (ignore) {
73-
reset_limits(e);
74-
} else {
75-
if (rect.x1 > rect.x2) {
76-
e.x0 = std::numeric_limits<double>::infinity();
77-
e.x1 = -std::numeric_limits<double>::infinity();
78-
} else {
79-
e.x0 = rect.x1;
80-
e.x1 = rect.x2;
81-
}
82-
if (rect.y1 > rect.y2) {
83-
e.y0 = std::numeric_limits<double>::infinity();
84-
e.y1 = -std::numeric_limits<double>::infinity();
85-
} else {
86-
e.y0 = rect.y1;
87-
e.y1 = rect.y2;
88-
}
89-
e.xm = *minpos.data(0);
90-
e.ym = *minpos.data(1);
91-
}
92-
93-
update_path_extents(path, trans, e);
94-
95-
changed = (e.x0 != rect.x1 || e.y0 != rect.y1 || e.x1 != rect.x2 || e.y1 != rect.y2 ||
96-
e.xm != *minpos.data(0) || e.ym != *minpos.data(1));
97-
98-
py::ssize_t extentsdims[] = { 2, 2 };
99-
py::array_t<double> outextents(extentsdims);
100-
*outextents.mutable_data(0, 0) = e.x0;
101-
*outextents.mutable_data(0, 1) = e.y0;
102-
*outextents.mutable_data(1, 0) = e.x1;
103-
*outextents.mutable_data(1, 1) = e.y1;
104-
105-
py::ssize_t minposdims[] = { 2 };
106-
py::array_t<double> outminpos(minposdims);
107-
*outminpos.mutable_data(0) = e.xm;
108-
*outminpos.mutable_data(1) = e.ym;
109-
110-
return py::make_tuple(outextents, outminpos, changed);
111-
}
112-
11355
static py::tuple
11456
Py_get_path_collection_extents(agg::trans_affine master_transform,
11557
mpl::PathGenerator paths,
@@ -374,8 +316,6 @@ PYBIND11_MODULE(_path, m, py::mod_gil_not_used())
374316
"x"_a, "y"_a, "radius"_a, "path"_a, "trans"_a);
375317
m.def("points_in_path", &Py_points_in_path,
376318
"points"_a, "radius"_a, "path"_a, "trans"_a);
377-
m.def("update_path_extents", &Py_update_path_extents,
378-
"path"_a, "trans"_a, "rect"_a, "minpos"_a, "ignore"_a);
379319
m.def("get_path_collection_extents", &Py_get_path_collection_extents,
380320
"master_transform"_a, "paths"_a, "transforms"_a, "offsets"_a,
381321
"offset_transform"_a);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /