@@ -69,10 +69,21 @@ static void PyFT2Image_dealloc(PyFT2Image *self)
69
69
const char *PyFT2Image_draw_rect__doc__ =
70
70
" draw_rect(self, x0, y0, x1, y1)\n "
71
71
" --\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
+ ;
73
76
74
77
static PyObject *PyFT2Image_draw_rect (PyFT2Image *self, PyObject *args)
75
78
{
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
+
76
87
double x0, y0 , x1, y1 ;
77
88
78
89
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
820
831
const char *PyFT2Font_get_xys__doc__ =
821
832
" get_xys(self, antialiased=True)\n "
822
833
" --\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 " ;
824
837
825
838
static PyObject *PyFT2Font_get_xys (PyFT2Font *self, PyObject *args, PyObject *kwds)
826
839
{
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
+
827
848
bool antialiased = true ;
828
849
std::vector<double > xys;
829
850
const char *names[] = { " antialiased" , NULL };
0 commit comments