Home | Download | Screen shots | Discussion | Documentation | Links |
---|
Inheritance diagram for SFImage:
Public Methods | |
SFImage () throw () | |
SFImage (size_t w, size_t h, size_t nc, const unsigned char *pixels=0) throw (std::bad_alloc) | |
Create an SFImage. | |
SFImage (const SFImage &) throw (std::bad_alloc) | |
Copy constructor. | |
virtual | ~SFImage () throw () |
Destructor. | |
SFImage & | operator= (const SFImage &rhs) throw (std::bad_alloc) |
Assignment. | |
size_t | getWidth () const throw () |
Get the image width. | |
size_t | getHeight () const throw () |
Get the image height. | |
size_t | getComponents () const throw () |
Get the number of components. | |
const unsigned char * | getPixels () const throw () |
Get the pixel data. | |
void | set (size_t width, size_t height, size_t components, const unsigned char *pixels) throw (std::bad_alloc) |
Set the image. | |
virtual std::auto_ptr< FieldValue > | clone () const throw (std::bad_alloc) |
Virtual copy constructor. | |
virtual FieldValue & | assign (const FieldValue &value) throw (std::bad_cast, std::bad_alloc) |
Virtual assignment. | |
virtual Type | type () const throw () |
Get the FieldValue::Type associated with this class. | |
Private Methods | |
virtual void | print (std::ostream &out) const |
Print to an output stream. | |
Private Attributes | |
size_t | d_w |
size_t | d_h |
size_t | d_nc |
unsigned char * | d_pixels |
|
Construct the default SFImage. |
|
Create an SFImage. Note that the pixels read from lower left to upper right, which is a reflection around the y-axis from the "normal" convention. Note also that width and height are specified in pixels, and a pixel may be more than one byte wide. For example, an image with a width and height of 16, and nc==3, would have a pixel array w*h*nc = 16*16*3 = 768 bytes long. See the class intro above for the interpretation of different pixel depths.
|
|
Copy constructor.
|
|
Destructor.
|
|
Virtual assignment.
Implements FieldValue. |
|
Virtual copy constructor.
Implements FieldValue. |
|
Get the number of components.
|
|
Get the image height.
|
|
Get the pixel data.
|
|
Get the image width.
|
|
Assignment.
|
|
Print to an output stream.
Implements FieldValue. |
|
Set the image.
|
|
Get the FieldValue::Type associated with this class.
Implements FieldValue. |