Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGBitmap Class Reference

#include <fastgl.h>

Inheritance diagram for fgl::FGBitmap:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGBitmap:

Collaboration graph
[legend]
List of all members.

Detailed Description

Used for an image file manipulating (load/save of various formats is implemented).
Examples:

alpha.cpp, bitmap.cpp, fgcolor.cpp, fgv.cpp, gif.cpp, and hello.cpp.


Public Types

enum  ReturnValues { IMAGE_OK, IMAGE_FILE_NOT_FOUND, IMAGE_UNKNOWN_FORMAT, IMAGE_UNSUPPORTED_FORMAT, IMAGE_FILE_WRITE_ERROR }
enum  ImageFormats {
  IMAGE_AUTO, IMAGE_BMP, IMAGE_GIF, IMAGE_TGA, IMAGE_PNG, IMAGE_JPG,
  IMAGE_TIF, IMAGE_PCX, IMAGE_UNKNOWN, IMAGE_LAST
}

Public Member Functions

 FGBitmap ()
 FGBitmap (const char *name)
 FGBitmap (FGDrawBuffer *)
 FGBitmap (int, int, FGPixel=CBLACK)
 FGBitmap (FGBitmap &old)
ReturnValues BitmapSave (const char *, bool convert=false)
ReturnValues JpegSave (const char *name)
ReturnValues PngSave (const char *name)
ReturnValues LoadImage (const char *name, int imagefmt=IMAGE_AUTO)
ReturnValues SaveImage (const char *name, int imagefmt)


Member Enumeration Documentation

enum fgl::FGBitmap::ReturnValues
 

return values from LoadImage


Constructor & Destructor Documentation

fgl::FGBitmap::FGBitmap  ) 
 

Creates an empty bitmap image object. You must use LoadImage() to load from file.

fgl::FGBitmap::FGBitmap const char *  name  ) 
 

Creates "in memory" object from the bitmap file with name. The file must be one from supported and enabled image formats. If an operation is OK, then data member type is != BMP_NONE, else file doesn't exist or isn't a valid image file.

Deprecated:

fgl::FGBitmap::FGBitmap FGDrawBuffer wPtr  ) 
 

Create a BITMAP object in memory as exact copy of the FGDrawBuffer object. This one has dimensions and contents the same as source buffer. The image has been copied from, that you can't expect that any next changes are appears in it. The application of one are when you want save the contents of a window to the BMP file by example.

fgl::FGBitmap::FGBitmap int  ww,
int  hh,
FGPixel  color = CBLACK
 

Create a BITMAP object in memory with specified size and color layout.


Member Function Documentation

FGBitmap::ReturnValues fgl::FGBitmap::BitmapSave const char *  ,
bool  convert = false
 

Deprecated:


Generated on Wed Feb 9 11:31:39 2005 for OpenGUI by  doxygen 1.4.0