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

Re: Surface batch methods... Re: [pygame] API draft for vector type



Quoting Casey Duncan <casey@xxxxxxxxxxx>:
> 
> Also, I was assuming that color_array (aka colors) and rect_array (aka  
> rects) would only accept array buffers and not arbitrary sequences of  
> Color, Rect or tuple, but you seem to be implying support for the  
> latter. Is that right?
> 
Hi Casey,

See _arraysurfarray.c for an example of using the array interface. Unlike a
simple buffer it gives information on shape and item type. So object testing is
much more thorough and safe. Both Numeric and Numpy support the array interface.
And the Python 3 buffer interface is also supposed to provide similar information.

-- 
Lenard Lindstrom
<len_l@xxxxxxxxx>