From: David C. <D. C. <si...@te...> - 2000-06-03 17:55:51
|
Mark Baker writes: > > In order to get the behavior you're looking for, you'd need to do something > like: > > y_list = video[100] > y_list[100] = video.map_rgb((255, 255, 255)) > video[100] = y_list > > Cleary for one pixel, it's advantegous to use set_at. > Got it. Is it your plan to eventually switch to a video[y][x] = color scheme, or is the current system as far as you want to take this? A note: in my testing, writing individual pixels by using the surface object's "list of lists" structure is about 25% slower than by using set_at() (as expected). While waiting for 0.0.6, I'll be porting Sam's aliens.c over to python. I'm pretty excited about this, since the blit-heavy nature of the program should result in pretty good performance, and I think that most SDL users learn by reading aliens.c (there's a lot of "aliensisms" in other peoples code :)) David Clark si...@te... Preliminary pySDL Documentation: http://www3.telus.net/futility/futility/docs/pysdl/index.html |