Hey folks - I'm working on creating a simulation/animation for my research. I mostly use PDL for my computational stuff. I was reading through your docs and it occurred to me that it would be really handy if there was some way to convert between a Rectangle and a piddle. I assume that a rectangle object is stored in memory as an array packed into a scalar, or something like that. PDL has powerful element selection capabilities and can make writing hand-rolled C code a cinch. Perhaps we could work together to create a couple of functions that look like:
my ($red_piddle, $green_piddle, $blue_piddle, $alpha_piddle) = sdl_rect_to_pdl($rectangle); # do something with the values in the different channels. $rectangle = pdl_to_rect($red_piddle, $green_piddle, $blue_piddle, $alpha_piddle); This could be very powerful. What do you think? Thanks! David