#include <WP_Image.h>
Public Methods | |
WP_Image () | |
WP_Image (int width, int height) | |
WP_Image (const string &filename) | |
WP_Image (const WP_Image &image) | |
~WP_Image () | |
WP_Image & | operator= (const WP_Image &image) |
void | setPixel (int x, int y, const WP_RGBA &p) |
void | setFastPixel (int x, int y, const WP_RGBA &p) |
WP_RGBA * | getPixel (int x, int y) |
WP_RGBA * | getFastPixel (int x, int y) |
void | drawToFrameBuffer () const |
bool | readFromFrameBuffer (int x, int y, int width, int height) |
void | copy (int x, int y, int width, int height) |
void | setTextureGL (GLuint *texture_id, GLint wrap_s=GL_REPEAT, GLint wrap_t=GL_REPEAT, GLint mag_filter=GL_NEAREST, GLint min_filter=GL_NEAREST, bool mipmapping=false) |
bool | loadImage (const string &file) |
void | chromaKey (const WP_RGBA &key, byte alpha) |
Public Attributes | |
int | rasterpos_x |
int | rasterpos_y |
int | rows |
int | columns |
Protected Methods | |
bool | hasValidExtension (const string &file, const string &extension) |
bool | loadBMP (const string &file) |
bool | loadPCX (const string &file) |
Protected Attributes | |
WP_RGBA * | pixels |
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
|
|
|
this function is able to set the alpha of all pixels matching the key pixel (chroma keying or blue screening)
|
|
this function copies a rectangular portion of the backbuffer (the lowerleft corner, indicated by x, y, width and height) to the backbuffer at the current raster position
|
|
this function draws the image directly to the framebuffer using OpenGL, placing the lower left corner of the pixmap at the current raster position (rasterpos_x and rasterpos_y) |
|
this functions gets a pixel from the image without checking the ranges
|
|
this functions gets a pixel from the image
|
|
this function checks the extension of a file
|
|
this function loads a bitmap (.bmp). Currently compressed/uncompressed 8 bit (indexed) and uncompressed 24 bit RGB bmp
|
|
this function loads an image
|
|
this function loads ZSoft pcx file format (.pcx). Currently compressed 24 bit indexed and compressed 24 bit RGB pcs
|
|
assignment operator
|
|
this function reads an rectangular image from the lower leftcorner of the framebuffer and stores it in this image
|
|
this function writes a pixel in the current image without checking the x and y ranges
|
|
this function writes a pixel in the current image
|
|
this function creates a texture from this image and sets it for the use in OpenGL
|
|
the number of pixel columns in the image |
|
the array of pixels |
|
the x raster position of the image in the framebuffer |
|
the y raster position of the image in the framebuffer |
|
the number of pixel rows in the image |