bool TCOD_image_is_pixel_transparent(TCOD_image_t image, int x, int y) { image_data_t *img=(image_data_t *)image; TCOD_color_t col=TCOD_image_get_pixel(image,x,y); if ( img->has_key_color && img->key_color.r == col.r && img->key_color.g == col.g && img->key_color.b == col.b ) { return true; } if ( TCOD_image_get_alpha(image,x,y) == 0 ) return true; return false; }
int TCODImage::getAlpha(int x,int y) const { return TCOD_image_get_alpha(data,x,y); }