[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] New transformations for future Pygame releases




On Mar 9, 2008, at 12:17 PM, Brian Fisher wrote:

On Sun, Mar 9, 2008 at 11:24 AM, Casey Duncan <casey@xxxxxxxxxxx> wrote:
Seems like some folks (Fredrik Lundh among them) have made some agg
wrappers for python:

http://effbot.org/zone/aggdraw-index.htm
http://tachyon.in/davinci/

The latter one is part of a larger package. Fredrik's includes an api
to do affine transforms.

There are 2 basic problems with all existing bindings to agg code when
it comes to using them with pygame. The first is they don't have tight
integration with pygame surfaces (wouldn't it be great to just simply
draw one surface rotated scaled and colored onto another? how about
being able to use a pygame surface as the texture for a line? how
about using a pygame surface as the texture for a filled shape?)

Certainly, I mostly pointed them out in case they would be useful to the original poster or useful as jumping off points for a tighter integration with pygame. I think such features tightly integrated with pygame surfaces would be phenomenal. OTOH, it might make more sense to just do such operations on the GPU (which afaict agg does not leverage), granted that may be less portable.

The second is that there is no canonical set of agg features to bind
to - in my opinion it's better to think of agg as the first place to
go to get code to implement whatever rendering feature you want (it
lets you start solving your rendering problem at a very high level to
start)

So rather than integrate with agg, per se, just reimplement the desired algorithms in pygame? Obviously not having another dependancy is highly desirable, guess it just depends on suitable volunteer motivation.

-Casey