@@ -69,10 +69,21 @@ static void PyFT2Image_dealloc(PyFT2Image *self)
6969const char *PyFT2Image_draw_rect__doc__ =
7070 " draw_rect(self, x0, y0, x1, y1)\n "
7171 " --\n\n "
72- " Draw an empty rectangle to the image.\n " ;
72+ " Draw an empty rectangle to the image.\n "
73+ " \n "
74+ " .. deprecated:: 3.8\n " ;
75+ ;
7376
7477static PyObject *PyFT2Image_draw_rect (PyFT2Image *self, PyObject *args)
7578{
79+ char const * msg =
80+ " FT2Image.draw_rect is deprecated since Matplotlib 3.8 and will be removed "
81+ " two minor releases later as it is not used in the library. If you rely on "
82+ " it, please let us know." ;
83+ if (PyErr_WarnEx (PyExc_DeprecationWarning, msg, 1 )) {
84+ return NULL ;
85+ }
86+
7687 double x0, y0, x1, y1;
7788
7889 if (!PyArg_ParseTuple (args, " dddd:draw_rect" , &x0, &y0, &x1, &y1)) {
@@ -820,10 +831,20 @@ static PyObject *PyFT2Font_draw_glyphs_to_bitmap(PyFT2Font *self, PyObject *args
820831const char *PyFT2Font_get_xys__doc__ =
821832 " get_xys(self, antialiased=True)\n "
822833 " --\n\n "
823- " Get the xy locations of the current glyphs.\n " ;
834+ " Get the xy locations of the current glyphs.\n "
835+ " \n "
836+ " .. deprecated:: 3.8\n " ;
824837
825838static PyObject *PyFT2Font_get_xys (PyFT2Font *self, PyObject *args, PyObject *kwds)
826839{
840+ char const * msg =
841+ " FT2Font.get_xys is deprecated since Matplotlib 3.8 and will be removed two "
842+ " minor releases later as it is not used in the library. If you rely on it, "
843+ " please let us know." ;
844+ if (PyErr_WarnEx (PyExc_DeprecationWarning, msg, 1 )) {
845+ return NULL ;
846+ }
847+
827848 bool antialiased = true ;
828849 std::vector<double > xys;
829850 const char *names[] = { " antialiased" , NULL };
0 commit comments