I needed a way to break apart a loaded bitmap into a grid of smaller bitmaps so I could then manipulate them separately. I ended up creating BitmapGrid.as, a class that will break apart your bitmaps into an array for you to do with as you please.
I needed a way to break apart a loaded bitmap into a grid of smaller bitmaps so I could then manipulate them separately. I ended up creating BitmapGrid.as, a class that will break apart your bitmaps into an array for you to do with as you please.
This is pretty sweet! It might be nice, though, if the spacing weren’t applied to the last column like that. Also, if the function returned a multidimensional array so you could do something like
result[x][y], instead of having to figure out the index of the position you want. In any case, I can think of a lot of places where this will come in handy.Comment by matthew — December 28, 2009 @ 9:04 am
Also, if the function returned a multidimensional array so you could do something like result[x][y]
I will implement that, should be pretty easy.
Comment by admin — December 29, 2009 @ 8:36 am