Open GoogleCodeExporter opened 9 years ago
GetPixel also does behave strangely on sprite sheets as you cannot specify a
frame to get the pixel from, but can actually get pixels from out of bounds
(seen from a spritesheets pov where the image is actually just as big as one
frame).
So another option would be to add a
GetPixel(int x, int y, int frameNo) function, which returns the pixel in frame
#frameno.
But then I would opt for making the frameNo parameter option (with default
value 0) and adding a function
GetPixelFromWholeImage(int x, int y) which gets a pixel from the whole image
rather the frame (name subject to change).
The changes GetPixel function would still behave as usual on non-spritesheets
as the default parameter for the frameNo is 0, which then refers to the whole
image.
Original comment by foxbl...@gmail.com
on 8 Nov 2010 at 8:54
The only initial thought I have is that we could store xTiles and yTiles, the
offset of each tile and we already have a tileSheet variable.
With this information the getPixel and setPixel functions could take into
account the current tile that is accessible.
As mentioned an alternative function could provide full sheet access to pixels.
Original comment by pokeparadox@gmail.com
on 9 Nov 2010 at 12:42
Original issue reported on code.google.com by
foxbl...@gmail.com
on 8 Nov 2010 at 7:03