* Changes the color of a pixel in the surface and returns the * next pixel position. Useful when changing a lot of pixels in * a row, eg. loading images. * @param x Pointer to the X position of the pixel. Changed to the next X position in the sequence. * @param y Pointer to the Y position of the pixel. Changed to the next Y position in the sequence. * @param pixel New color for the pixel
| 154 | * @param pixel New color for the pixel. |
| 155 | */ |
| 156 | void setPixelIterative(int *x, int *y, Uint8 pixel) |
| 157 | { |
| 158 | setPixel(*x, *y, pixel); |
| 159 | (*x)++; |
| 160 | if (*x == getWidth()) |
| 161 | { |
| 162 | (*y)++; |
| 163 | *x = 0; |
| 164 | } |
| 165 | } |
| 166 | /** |
| 167 | * Returns the color of a specified pixel in the surface. |
| 168 | * @param x X position of the pixel. |