Re: [pygame] get coluor of a sprite

2008-12-27 Thread Gonzalo Castro
Thanks everybody!

Surface.get_at worked fine for me. I'll try the others :)

Thanks.


Re: [pygame] get coluor of a sprite

2008-12-26 Thread Nirav Patel
There is an average_color function in the transform module in Pygame SVN.

On Fri, Dec 26, 2008 at 9:44 PM, yanom @linuxmail.org
 wrote:
> if you wanted to get the overall average color of a sprite, you would have to 
> use a for loop to go through all the pixels and count the pixels of each 
> color or something
> - Original Message -
>> From: "Aaron Maupin" 
>> To: pygame-users@seul.org
>> Subject: Re: [pygame] get coluor of a sprite
>> Date: Sat, 27 Dec 2008 05:22:12 +0900
>>
>>
>> Gonzalo Castro wrote:
>> > What function may I use to get the colour of a sprite?
>>
>> Very easy.  Use Surface.get_at((x, y)) where x and y equals the
>> pixel in the surface you want to check the color of.
>>
>> http://www.pygame.org/docs/ref/surface.html#Surface.get_at
>
>>
>
>
> =
> Military Relocation Service
> Jan and Mary Team get you moving. Professional Real Estate Services.
> http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=e12ad774014ddc03c02fb38da65ab85a
>
>
> --
> Powered by Outblaze
>


Re: [pygame] get coluor of a sprite

2008-12-26 Thread yanom @linuxmail.org
if you wanted to get the overall average color of a sprite, you would have to 
use a for loop to go through all the pixels and count the pixels of each color 
or something
- Original Message -
> From: "Aaron Maupin" 
> To: pygame-users@seul.org
> Subject: Re: [pygame] get coluor of a sprite
> Date: Sat, 27 Dec 2008 05:22:12 +0900
> 
> 
> Gonzalo Castro wrote:
> > What function may I use to get the colour of a sprite?
> 
> Very easy.  Use Surface.get_at((x, y)) where x and y equals the 
> pixel in the surface you want to check the color of.
> 
> http://www.pygame.org/docs/ref/surface.html#Surface.get_at

>


=
Military Relocation Service
Jan and Mary Team get you moving. Professional Real Estate Services.
http://a8-asy.a8ww.net/a8-ads/adftrclick?redirectid=e12ad774014ddc03c02fb38da65ab85a


-- 
Powered by Outblaze


Re: [pygame] get coluor of a sprite

2008-12-26 Thread Aaron Maupin

Gonzalo Castro wrote:
What function may I use to get the colour of a sprite? 


Very easy.  Use Surface.get_at((x, y)) where x and y equals the pixel in 
the surface you want to check the color of.


http://www.pygame.org/docs/ref/surface.html#Surface.get_at


[pygame] get coluor of a sprite

2008-12-26 Thread Gonzalo Castro
Hello everybody!

What function may I use to get the colour of a sprite? I'm not talking
about filling it with a colour, I'm talking about a function that
returns the colur of the sprite.

Thanks, and have a happy new year! :)