|
< index < 5. Image toolkit |
===================================== |
C++ : TCODColor TCODImage::getPixel(int x, int y) const C : TCOD_color_t TCOD_image_get_pixel(TCOD_image_t image,int x, int y)
| Parameter | Description |
|---|---|
| image | In the C version, the image handler, obtained with the load function. |
| x,y | The pixel coordinates inside the image. 0 <= x < width 0 <= y < height |
C++ : TCODImage *pix = new TCODImage(80,50);
TCODColor col=pix->getPixel(40,25);
C : TCOD_image_t pix = TCOD_image_new(80,50);
TCOD_color_t col=TCOD_image_get_pixel(pix,40,25);