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

Re: [pygame] SVG and SDL/pygame with pycairo?



On Thursday 28 July 2005 05:44 am, Bob Ippolito wrote: 
> On Jul 28, 2005, at 12:02 AM, Terry Hancock wrote:
> > I think the easiest way to make this work is to write a  Pyrex module
> > around that demo.  Then I need to know how to wrap the resulting
> > *SDL* surface  in a *PyGame* surface (which is presumeably not
> > hard, but I'll need to look at the PyGame sources to figure it out ---
> > probably have to call a PyGame extension module from Pyrex?)
> >
> > I don't presently know how to do that, but I just downloaded the
> > PyGame sources to look.
> 
> src/pygame.h and src/surface.c .. in particular, PySurface_New is  
> exactly this.

Thank you! I bet that will save me a lot of trouble. ;-)

Actually, if PyGame uses the Python C API rather than Pyrex, then
it probably is easier to just follow suite.

I just keep looking for a good excuse to use Pyrex, that's all. ;-)

Though to be fair, I would've done this entirely with Python if
I could get away with it.  I really want to use SVG though, as I 
think it will improve the appearance of the game and simultaneously
keep the download size small (with compression, anyway).

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com