Commits

Anonymous committed 0496a1e

no more tilerow

Comments (0)

Files changed (4)

 # BREAK = change breaks existing code
 # BUG	= fixed a bug that was (or could have been) crashing
 
+December 5, 2002
+	tilerow stuff removed
+
 December 2, 2002
 	experimental pygame.draw.tilerow()
 
 <a href=ref/pygame_draw.html#lines>pygame.draw.lines</a> - draw multiple connected lines on a surface<br>
 <a href=ref/pygame_draw.html#polygon>pygame.draw.polygon</a> - draws a polygon on a surface<br>
 <a href=ref/pygame_draw.html#rect>pygame.draw.rect</a> - draws a rectangle on a surface<br>
-<a href=ref/pygame_draw.html#tilerow>pygame.draw.tilerow</a> - draws a row of tile images to a Surface<br>
 <a href=ref/pygame_event.html#Event>pygame.event.Event</a> - create new event object<br>
 <a href=ref/pygame_event.html#clear>pygame.event.clear</a> - remove all of an event type from the queue<br>
 <a href=ref/pygame_event.html#event_name>pygame.event.event_name</a> - name for event type<br>

docs/ref/pygame_draw.html

 draws a rectangle on a surface</td></tr>
 
 
-<tr><td><a href=#tilerow>tilerow</a></td><td> -
-draws a row of tile images to a Surface</td></tr>
-
-
 </table>
 
 <hr>
 can be hardware accelerated when the moons are in alignement.
 </ul><br>&nbsp;<br>
 
-<a name=tilerow><font size=+2><b>tilerow
-</b></font><br><font size=+1><tt>
-pygame.draw.tilerow(Surface, Surface_sequence, pos) -> None
-</tt></font><ul>
-Draws a sequence of tiles as a row on the destination surface.
-Each image will be drawn, offset by the width of the previous
-image. Usually all tile images will be the same size, but this
-would allow for some slight changes.
-<br>&nbsp;<br>
-If None is one of the sequence elements, then that tile area will
-be skipped. The width of the skipped tile will be determined by its
-neighbor.
-</ul><br>&nbsp;<br>
-
 
 <hr>
 </body></html>
 
 
 
-
-    /*DOC*/ static char doc_tilerow[] =
-    /*DOC*/    "pygame.draw.tilerow(Surface, Surface_sequence, pos) -> None\n"
-    /*DOC*/    "draws a row of tile images to a Surface\n"
-    /*DOC*/    "\n"
-    /*DOC*/    "Draws a sequence of tiles as a row on the destination surface.\n"
-    /*DOC*/    "Each image will be drawn, offset by the width of the previous\n"
-    /*DOC*/    "image. Usually all tile images will be the same size, but this\n"
-    /*DOC*/    "would allow for some slight changes.\n"
-    /*DOC*/    "\n"
-    /*DOC*/    "If None is one of the sequence elements, then that tile area will\n"
-    /*DOC*/    "be skipped. The width of the skipped tile will be determined by its\n"
-    /*DOC*/    "neighbor.\n"
-    /*DOC*/ ;
-
-static PyObject* draw_tilerow(PyObject* self, PyObject* arg)
-{
-	SDL_Surface *src, *dst;
-	PyObject *dstobj, *sequence, *srcobj;
-	SDL_Rect dstrect;
-	int x, y, loop, length, skipped, rightedge, width;
-
-	if(!PyArg_ParseTuple(arg, "O!O(ii)", &PySurface_Type, &dstobj, &sequence, &x, &y))
-		return NULL;
-	if(!PySequence_Check(sequence))
-		return RAISE(PyExc_TypeError, "tilerow sequence argument must be a sequence");
-	dst = PySurface_AsSurface(dstobj);
-
-	rightedge = dst->clip_rect.x + dst->clip_rect.w;
-	dstrect.x = x;
-	dstrect.y = y;
-	skipped = 0;
-	length = PySequence_Length(sequence);
-	for(loop=0; loop<length; loop++)
-	{
-		srcobj = PySequence_GetItem(sequence, loop);
-		if(!srcobj) return NULL;
-		if(srcobj == Py_None)
-		{
-			skipped++;
-			Py_DECREF(srcobj);
-			continue;
-		}
-		if(!PySurface_Check(srcobj))
-		{
-			Py_DECREF(srcobj);
-			return RAISE(PyExc_TypeError, "sequence must contain Surface objects");
-		}
-		src = PySurface_AsSurface(srcobj);
-		dstrect.w = width = src->w;
-		dstrect.h = src->h;
-		if(skipped)
-		{
-			dstrect.w += src->w * skipped;
-			skipped = 0;
-			if(dstrect.w >= rightedge)
-			{
-				Py_DECREF(srcobj);
-				RETURN_NONE;
-			}
-		}
-		
-		x = dstrect.x;
-		if(PySurface_Blit(dstobj, srcobj, &dstrect, NULL) != 0)
-		{
-			Py_DECREF(srcobj);
-			return NULL;
-		}
-
-		Py_DECREF(srcobj);
-		dstrect.x = x + width;
-		if(dstrect.x >= rightedge)
-			RETURN_NONE
-	}
-
-	RETURN_NONE;
-}
-
-
-
-
-
-
 /*internal drawing tools*/
 
 static int clip_and_draw_line(SDL_Surface* surf, SDL_Rect* rect, Uint32 color, int* pts)
 	{ "polygon", polygon, 1, doc_polygon },
 	{ "rect", rect, 1, doc_rect },
 
-	{ "tilerow", draw_tilerow, 1, doc_tilerow },
-
 	{ NULL, NULL }
 };