Commits

pygame  committed 1134ff2

Surface.set_clip fixed

  • Participants
  • Parent commits 7231ae4

Comments (0)

Files changed (3)

 This is a list of changes in pygame's history.
 
+Nov 15, 2000
+	Surface.set_clip() fixed when passing no args [BUG]
 
 Nov 15, 2000
 	time.set_timer() now handles multiple timers

File docs/ref/Surface.html

 
 <a name=set_clip><font size=+2><b>set_clip
 </b></font><br><font size=+1><tt>
-Surface.set_clip([rectstyle])) -> Rect
+Surface.set_clip([rectstyle])) -> None
 </tt></font><ul>
 Assigns the destination clipping rectangle for the Surface. When
 blit or fill operations are performed on the Surface, they are
 restricted to the inside of the clipping rectangle. If no
 rectangle is passed, the clipping region is set to the entire
-Surface area.
+Surface area. The rectangle you pass will be clipped to the area of
+the Surface.
 </ul><br>&nbsp;<br>
 
 <a name=set_colorkey><font size=+2><b>set_colorkey

File src/surface.c

 
 
     /*DOC*/ static char doc_surf_set_clip[] =
-    /*DOC*/    "Surface.set_clip([rectstyle])) -> Rect\n"
+    /*DOC*/    "Surface.set_clip([rectstyle])) -> None\n"
     /*DOC*/    "assign destination clipping rectangle\n"
     /*DOC*/    "\n"
     /*DOC*/    "Assigns the destination clipping rectangle for the Surface. When\n"
     /*DOC*/    "blit or fill operations are performed on the Surface, they are\n"
     /*DOC*/    "restricted to the inside of the clipping rectangle. If no\n"
     /*DOC*/    "rectangle is passed, the clipping region is set to the entire\n"
-    /*DOC*/    "Surface area.\n"
+    /*DOC*/    "Surface area. The rectangle you pass will be clipped to the area of\n"
+    /*DOC*/    "the Surface.\n"
     /*DOC*/ ;
 
 static PyObject* surf_set_clip(PyObject* self, PyObject* args)
 		if(!rect)
 			return RAISE(PyExc_ValueError, "invalid rectstyle object");
 	}
+		
 	result = SDL_SetClipRect(surf, (SDL_Rect*)rect);
 	if(result == -1)
 		return RAISE(PyExc_SDLError, SDL_GetError());
-	return PyRect_New(rect);
+
+	RETURN_NONE
 }