The Fast Light Environment Kit



class FImage

Include Files

#include <Flek/FImage.H>

Description

FImage provides four 8 bit channels (Red, Green, Blue and Alpha). The image is stored internally as an array of unsigned chars in RGBA order. The internal representation can be used directly by OpenGL with the GL_RGBA format and the GL_UNSIGNED_BYTE type.

Methods


Method Descriptions

FImage

FImage::FImage();

The default constructor does not allocate any space for the image.

FImage::FImage(int w, int h, int channels=4);

This constructor allocated W*H pixels for storing the image.

FImage::FImage(FImage *src);

The copy constructor.

begin

iterator FImage::begin(int r);

Return an iterator connected to the first pixel on row r of the image.

iterator FImage::begin();

Return an iterator connected to the first pixel in the image.

channels

int FImage::channels();

Gets the number of channels.

void FImage::channels(int c);

Sets the number of channels. Crops or expands the number of channels.

clear

void FImage::clear(uchar r=0, uchar g=0, uchar b=0, uchar a=0);

Clear the image to a certain color.

end

iterator FImage::end(int r);

Return an iterator connected to the last+1 pixel on row r of the image.

iterator FImage::end();

Return an iterator connected to the last+1 pixel in the image.

height

int FImage::height();

Gets the height of the image.

operator()

iterator FImage::operator()(int x, int y);

Return an iterator connected to position x, y.

scale

FImage* FImage::scale(int w, int h);

A really bad scale function.

width

int FImage::width();

Gets the width of the image.

~FImage

FImage::~FImage();

The destructor deallocated any allocated memory.

© 2000 the Flek Development team.
Generated by ScanDoc
Last Updated: Tue May 15 8:50:06 2001