Commits

Anonymous committed 1134ff2

Surface.set_clip fixed

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

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
 
 
     /*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
 }
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.