[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Draw primitives and RGBA



Korruptor wrote:
> Are there any plans to get the pygame.draw primitives to accept an RGBA 
> colour value? This would be very handy on the polygon one in particular. 
> I have a cunning plan... ;)
> 
> I'm happy to get alpha by other means, just thought it would be nice...

there's two ways to do this. one is to simply set the RGB and A values sort 
of like we are doing now. actually, thinking about it, i believe you can 
already do this? (/me checks the code...) yes, it will already work like 
this, setting the straight alpha values just like RGB.

what you are probably wanting is to actually draw primitive transparantly 
onto the surface. the code is not really difficult, and optimized 
transparent drawing would be far faster than drawing to temporary surfaces 
and blitting.

hmm, i suppose adding an "_alpha" version to the functions would be the 
best way to go (any ideas?) i'll put this on the pygame "todo" list, 
because it is a bit of a beast. another request has been to be able to big 
lists of primitives using a single call. that one is even messier, as there 
are a couple ways to store big lists of primitives.






____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org