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

Skip to content

Commit 3f8146b

Browse files
committed
Remove unused functions in _path
1 parent 251ae54 commit 3f8146b

File tree

3 files changed

+5
-96
lines changed

3 files changed

+5
-96
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
``ft2font.FT2Image.draw_rect`` and ``ft2font.FT2Font.get_xys``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
... are deprecated as they are unused. If you rely on these, please let us know.

src/_path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ inline bool point_in_path(
283283
}
284284

285285
template <class PathIterator, class PointArray, class ResultArray>
286-
void points_on_path(PointArray &points,
286+
inline void points_on_path(PointArray &points,
287287
const double r,
288288
PathIterator &path,
289289
agg::trans_affine &trans,

src/_path_wrapper.cpp

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -91,98 +91,6 @@ static PyObject *Py_points_in_path(PyObject *self, PyObject *args)
9191
return results.pyobj();
9292
}
9393

94-
const char *Py_point_on_path__doc__ =
95-
"point_on_path(x, y, radius, path, trans)\n"
96-
"--\n\n";
97-
98-
static PyObject *Py_point_on_path(PyObject *self, PyObject *args)
99-
{
100-
double x, y, r;
101-
py::PathIterator path;
102-
agg::trans_affine trans;
103-
bool result;
104-
105-
if (!PyArg_ParseTuple(args,
106-
"dddO&O&:point_on_path",
107-
&x,
108-
&y,
109-
&r,
110-
&convert_path,
111-
&path,
112-
&convert_trans_affine,
113-
&trans)) {
114-
return NULL;
115-
}
116-
117-
CALL_CPP("point_on_path", (result = point_on_path(x, y, r, path, trans)));
118-
119-
if (result) {
120-
Py_RETURN_TRUE;
121-
} else {
122-
Py_RETURN_FALSE;
123-
}
124-
}
125-
126-
const char *Py_points_on_path__doc__ =
127-
"points_on_path(points, radius, path, trans)\n"
128-
"--\n\n";
129-
130-
static PyObject *Py_points_on_path(PyObject *self, PyObject *args)
131-
{
132-
numpy::array_view<const double, 2> points;
133-
double r;
134-
py::PathIterator path;
135-
agg::trans_affine trans;
136-
137-
if (!PyArg_ParseTuple(args,
138-
"O&dO&O&:points_on_path",
139-
&convert_points,
140-
&points,
141-
&r,
142-
&convert_path,
143-
&path,
144-
&convert_trans_affine,
145-
&trans)) {
146-
return NULL;
147-
}
148-
149-
npy_intp dims[] = { (npy_intp)points.size() };
150-
numpy::array_view<uint8_t, 1> results(dims);
151-
152-
CALL_CPP("points_on_path", (points_on_path(points, r, path, trans, results)));
153-
154-
return results.pyobj();
155-
}
156-
157-
const char *Py_get_path_extents__doc__ =
158-
"get_path_extents(path, trans)\n"
159-
"--\n\n";
160-
161-
static PyObject *Py_get_path_extents(PyObject *self, PyObject *args)
162-
{
163-
py::PathIterator path;
164-
agg::trans_affine trans;
165-
166-
if (!PyArg_ParseTuple(
167-
args, "O&O&:get_path_extents", &convert_path, &path, &convert_trans_affine, &trans)) {
168-
return NULL;
169-
}
170-
171-
extent_limits e;
172-
173-
CALL_CPP("get_path_extents", (reset_limits(e)));
174-
CALL_CPP("get_path_extents", (update_path_extents(path, trans, e)));
175-
176-
npy_intp dims[] = { 2, 2 };
177-
numpy::array_view<double, 2> extents(dims);
178-
extents(0, 0) = e.x0;
179-
extents(0, 1) = e.y0;
180-
extents(1, 0) = e.x1;
181-
extents(1, 1) = e.y1;
182-
183-
return extents.pyobj();
184-
}
185-
18694
const char *Py_update_path_extents__doc__ =
18795
"update_path_extents(path, trans, rect, minpos, ignore)\n"
18896
"--\n\n";
@@ -845,9 +753,6 @@ static PyObject *Py_is_sorted(PyObject *self, PyObject *obj)
845753
static PyMethodDef module_functions[] = {
846754
{"point_in_path", (PyCFunction)Py_point_in_path, METH_VARARGS, Py_point_in_path__doc__},
847755
{"points_in_path", (PyCFunction)Py_points_in_path, METH_VARARGS, Py_points_in_path__doc__},
848-
{"point_on_path", (PyCFunction)Py_point_on_path, METH_VARARGS, Py_point_on_path__doc__},
849-
{"points_on_path", (PyCFunction)Py_points_on_path, METH_VARARGS, Py_points_on_path__doc__},
850-
{"get_path_extents", (PyCFunction)Py_get_path_extents, METH_VARARGS, Py_get_path_extents__doc__},
851756
{"update_path_extents", (PyCFunction)Py_update_path_extents, METH_VARARGS, Py_update_path_extents__doc__},
852757
{"get_path_collection_extents", (PyCFunction)Py_get_path_collection_extents, METH_VARARGS, Py_get_path_collection_extents__doc__},
853758
{"point_in_path_collection", (PyCFunction)Py_point_in_path_collection, METH_VARARGS, Py_point_in_path_collection__doc__},

0 commit comments

Comments
 (0)