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 > col

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

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! :)

Re: [pygame] euclid.Vector2 to pygame coordinate tuple shortcut?

2008-12-26 Thread Lenard Lindstrom
Lenard Lindstrom wrote: Jake b wrote: I wanted to use this to call pygame functions, ( I am not writing new functions in this way ) (It would save code and make it clearer then typing out the two members every time.) 'tuple()' seems to work this way :) Since a euclid Vector supports the sl

Re: [pygame] euclid.Vector2 to pygame coordinate tuple shortcut?

2008-12-26 Thread Lenard Lindstrom
Jake b wrote: I wanted to use this to call pygame functions, ( I am not writing new functions in this way ) (It would save code and make it clearer then typing out the two members every time.) 'tuple()' seems to work this way :) Since a euclid Vector supports the slice operator you can proba