Commits

illume committed eec1e38

Doc update about how Surface.get_at returns a copy, and notes about single pixel access.

Comments (0)

Files changed (1)

 get the color value at a single pixel
 Surface.get_at((x, y)): return Color
 
-Return the RGBA color value at the given pixel. If the Surface has no per
-pixel alpha, then the alpha value will always be 255 (opaque). If the pixel
-position is outside the area of the Surface an IndexError exception will
-be raised.
+Return a copy of the RGBA Color value at the given pixel. If the Surface has 
+no per pixel alpha, then the alpha value will always be 255 (opaque). 
+If the pixel position is outside the area of the Surface an IndexError 
+exception will be raised.
 
 Getting and setting pixels one at a time is generally too slow to be used
-in a game or realtime situation.
+in a game or realtime situation.  It is better to use methods which operate 
+on many pixels at a time like with the blit, fill and draw methods - 
+or by using surfarray/PixelArray.
 
 This function will temporarily lock and unlock the Surface as needed.
 
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.