@@ -105,18 +105,29 @@ aaline(PyObject *self, PyObject *arg, PyObject *kwargs)
105105 PyObject * colorobj , * start , * end ;
106106 SDL_Surface * surf = NULL ;
107107 float startx , starty , endx , endy ;
108+ PyObject * blend = NULL ;
108109 int drawn_area [4 ] = {INT_MAX , INT_MAX , INT_MIN ,
109110 INT_MIN }; /* Used to store bounding box values */
110111 Uint32 color ;
111- static char * keywords [] = {"surface" , "color" , "start_pos" , "end_pos" ,
112- NULL };
112+ static char * keywords [] = {"surface" , "color" , "start_pos" ,
113+ "end_pos" , "blend" , NULL };
113114
114- if (!PyArg_ParseTupleAndKeywords (arg , kwargs , "O!OOO|i " , keywords ,
115+ if (!PyArg_ParseTupleAndKeywords (arg , kwargs , "O!OOO|O " , keywords ,
115116 & pgSurface_Type , & surfobj , & colorobj ,
116- & start , & end )) {
117+ & start , & end , & blend )) {
117118 return NULL ; /* Exception already set. */
118119 }
119120
121+ if (blend != NULL ) {
122+ if (PyErr_WarnEx (
123+ PyExc_DeprecationWarning ,
124+ "blend argument is deprecated and has no functionality and "
125+ "will be completely removed in a future version of pygame-ce" ,
126+ 1 ) == -1 ) {
127+ return NULL ;
128+ }
129+ }
130+
120131 surf = pgSurface_AsSurface (surfobj );
121132 SURF_INIT_CHECK (surf )
122133
@@ -239,18 +250,30 @@ aalines(PyObject *self, PyObject *arg, PyObject *kwargs)
239250 float * xlist , * ylist ;
240251 float x , y ;
241252 int l , t ;
253+ PyObject * blend = NULL ;
242254 int drawn_area [4 ] = {INT_MAX , INT_MAX , INT_MIN ,
243255 INT_MIN }; /* Used to store bounding box values */
244256 int result , closed ;
245257 Py_ssize_t loop , length ;
246- static char * keywords [] = {"surface" , "color" , "closed" , "points" , NULL };
258+ static char * keywords [] = {"surface" , "color" , "closed" ,
259+ "points" , "blend" , NULL };
247260
248- if (!PyArg_ParseTupleAndKeywords (arg , kwargs , "O!OpO|i " , keywords ,
261+ if (!PyArg_ParseTupleAndKeywords (arg , kwargs , "O!OpO|O " , keywords ,
249262 & pgSurface_Type , & surfobj , & colorobj ,
250- & closed , & points )) {
263+ & closed , & points , & blend )) {
251264 return NULL ; /* Exception already set. */
252265 }
253266
267+ if (blend != NULL ) {
268+ if (PyErr_WarnEx (
269+ PyExc_DeprecationWarning ,
270+ "blend argument is deprecated and has no functionality and "
271+ "will be completely removed in a future version of pygame-ce" ,
272+ 1 ) == -1 ) {
273+ return NULL ;
274+ }
275+ }
276+
254277 surf = pgSurface_AsSurface (surfobj );
255278 SURF_INIT_CHECK (surf )
256279
0 commit comments