Hi Not done much this week but here's some documentation for SDL.blit_surface(). I've left out some of the subtleties in the original C docs and just filled in the basics. I hope I'm right in changing the method signature: I had a look at the PIKEFUN in SDL.cmod and tried out a small example and it seems you can set those last two args (srcrect & dstrect) to '0' or leave them out to get default behaviour.
Also, with SDL.Rect, is this the only way you can initialize an SDL.Rect object to, say, values 50, 50, 100, 100?
SDL.Rect r = SDL.Rect(); r->x = 50; r->y = 50; r->w = 100; r->h = 100;
Before I tried this: SDL.Rect r = SDL.Rect( 50, 50, 100, 100 );
but it didn't compile, presumably because there's no create() method matching that pattern? Would that be a useful thing to add, or is there a smarter way of setting the initial values?
Thanks and regards, larcky :)
I added those. SDL.Rect()->create now works with either 4, 2 or no arguments.
On Sat, 22 Jan 2011, Matthew Clarke wrote:
Hi Not done much this week but here's some documentation for SDL.blit_surface(). I've left out some of the subtleties in the original C docs and just filled in the basics. I hope I'm right in changing the method signature: I had a look at the PIKEFUN in SDL.cmod and tried out a small example and it seems you can set those last two args (srcrect & dstrect) to '0' or leave them out to get default behaviour.
Also, with SDL.Rect, is this the only way you can initialize an SDL.Rect object to, say, values 50, 50, 100, 100?
SDL.Rect r = SDL.Rect(); r->x = 50; r->y = 50; r->w = 100; r->h = 100;
Before I tried this: SDL.Rect r = SDL.Rect( 50, 50, 100, 100 );
but it didn't compile, presumably because there's no create() method matching that pattern? Would that be a useful thing to add, or is there a smarter way of setting the initial values?
Thanks and regards, larcky :)
Arne Gödeke wrote:
I added those. SDL.Rect()->create now works with either 4, 2 or no arguments.
Thanks! Just tried these out and they work perfectly. =)
pike-devel@lists.lysator.liu.se