Mercurial > pygame
diff src/pixelarray.doc @ 997:46a786465642
Added weight support to PixelArray.extract() and PixelArray.replace().
| author | marcus |
|---|---|
| date | Tue, 08 Apr 2008 18:57:29 +0000 |
| parents | 78ab04b73064 |
| children | 9e42170b0f2e |
line wrap: on
line diff
--- a/src/pixelarray.doc Tue Apr 08 08:47:39 2008 +0000 +++ b/src/pixelarray.doc Tue Apr 08 18:57:29 2008 +0000 @@ -95,7 +95,7 @@ replace Replaces the passed color in the PixelArray with another one. -PixelArray.replace (color, repcolor, distance=0): Return None +PixelArray.replace (color, repcolor, distance=0, weights=(0.299, 0.587, 0.114)): Return None Replaces the pixels with the passed color in the PixelArray by changing them them to the passed replacement color. @@ -114,7 +114,7 @@ extract Extracts the passed color from the PixelArray. -PixelArray.extract (color, distance=0): Return PixelArray +PixelArray.extract (color, distance=0, weights=(0.299, 0.587, 0.114)): Return PixelArray Extracts the passed color by changing all matching pixels to white, while non-matching pixels are changed to black. This returns a new
