Canola  0.8.D001
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
image_invert Class Reference

#include <invert.h>

Inheritance diagram for image_invert:
image

List of all members.

Public Member Functions

virtual ~image_invert ()

Static Public Member Functions

static pointer create (const image::pointer &deeper)

Protected Member Functions

const char * type_name (void) const
void get_pixel (int x, int y, icon_pixel &value) const
void set_pixel (int x, int y, const icon_pixel &value)
unsigned get_width (void) const
unsigned get_height (void) const
void save_to_file (const std::string &filename) const

Private Member Functions

 image_invert (const image::pointer &deeper)
 image_invert ()
 image_invert (const image_invert &rhs)
image_invertoperator= (const image_invert &rhs)

Private Attributes

image::pointer deeper

Detailed Description

The image_invert class is used to represent the processing required to invert the colours of an image, pixel by pixel.

Definition at line 27 of file invert.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 21 of file invert.cc.

image_invert::image_invert ( const image::pointer deeper) [private]

The constructor. It is private on purpose, use the create class method instead.

Parameters:
deeperthe source of the image to be inverted.

Definition at line 26 of file invert.cc.

The default constructor. It is private on purpose, use the create class method instead.

image_invert::image_invert ( const image_invert rhs) [private]

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

The create class method is used to create new dynamically allocated instance of this class.

Parameters:
deeperthe source of the image to be inverted.

Definition at line 33 of file invert.cc.

unsigned image_invert::get_height ( void  ) const [protected, virtual]

The get_height method may be used to obtain the height of the image, in pixels.

Implements image.

Definition at line 88 of file invert.cc.

void image_invert::get_pixel ( int  x,
int  y,
icon_pixel value 
) const [protected, virtual]

The get_pixel method may be used to obtain the value of the pixel at the given location.

Parameters:
xThe X cordinate of the pixel
yThe Y cordinate of the pixel
valueThe place where the pixel value is to be stored on return.

Implements image.

Definition at line 48 of file invert.cc.

unsigned image_invert::get_width ( void  ) const [protected, virtual]

The get_width method may be used to obtain the width of the image, in pixels.

Implements image.

Definition at line 80 of file invert.cc.

image_invert& image_invert::operator= ( const image_invert rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void image_invert::save_to_file ( const std::string &  filename) const [protected, virtual]

The save_to_file method is used to store the image data into a file on disk.

Parameters:
filenameThe name of the file to be written.

Implements image.

Definition at line 96 of file invert.cc.

void image_invert::set_pixel ( int  x,
int  y,
const icon_pixel value 
) [protected, virtual]

The set_pixel method may be used to set the value of the pixel at the given location. Transparency is ignored, the pixel becomes exactly as given; if you want transparentcy taken into account, use overlay_pixel. The pen_clr tracks the given value.

Parameters:
xThe X coordinate of the pixel to be set
yThe Y coordinate of the pixel to be set
valueThe value of the pixel to be set.

Implements image.

Definition at line 65 of file invert.cc.

const char * image_invert::type_name ( void  ) const [protected, virtual]

The type_name method is used to obtain the name of the type of this image format.

Implements image.

Definition at line 40 of file invert.cc.


Member Data Documentation

The deeper instance variable is used to remember the source of the image to be inverted.

Definition at line 78 of file invert.h.


The documentation for this class was generated from the following files: