|
Canola
0.8.D001
|
#include <monochrome.h>
Public Member Functions | |
| virtual | ~image_monochrome () |
Static Public Member Functions | |
| static pointer | create (const pointer &deeper) |
Protected Member Functions | |
| const char * | type_name () 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 () const |
| unsigned | get_height () const |
| void | save_to_file (const std::string &filename) const |
Private Member Functions | |
| image_monochrome (const pointer &deeper) | |
| image_monochrome () | |
| image_monochrome (const image_monochrome &) | |
| image_monochrome & | operator= (const image_monochrome &) |
Private Attributes | |
| pointer | deeper |
The image_monochrome class is used to represent a filter to turn a color image into a monochrome image.
Definition at line 27 of file monochrome.h.
| image_monochrome::~image_monochrome | ( | ) | [virtual] |
The destructor.
Definition at line 21 of file monochrome.cc.
| image_monochrome::image_monochrome | ( | const pointer & | deeper | ) | [private] |
The constructor. It is private on purpose, use the "create" class method instead.
| deeper | The image to be filtered. |
Definition at line 26 of file monochrome.cc.
| image_monochrome::image_monochrome | ( | ) | [private] |
The default constructor. Do not use.
| image_monochrome::image_monochrome | ( | const image_monochrome & | ) | [private] |
The copy constructor. Do not use.
| image::pointer image_monochrome::create | ( | const pointer & | deeper | ) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
| deeper | The image to be filtered. |
Definition at line 33 of file monochrome.cc.
| unsigned image_monochrome::get_height | ( | ) | const [protected, virtual] |
The get_height method may be used to obtain the height of the image, in pixels.
Implements image.
Definition at line 70 of file monochrome.cc.
| void image_monochrome::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.
| x | The X cordinate of the pixel |
| y | The Y cordinate of the pixel |
| value | The place where the pixel value is to be stored on return. |
Implements image.
Definition at line 47 of file monochrome.cc.
| unsigned image_monochrome::get_width | ( | ) | const [protected, virtual] |
The get_width method may be used to obtain the width of the image, in pixels.
Implements image.
Definition at line 63 of file monochrome.cc.
| image_monochrome& image_monochrome::operator= | ( | const image_monochrome & | ) | [private] |
The assignment operator. Do not use.
| void image_monochrome::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.
| filename | The name of the file to be written. |
Implements image.
Definition at line 78 of file monochrome.cc.
| void image_monochrome::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.
| x | The X coordinate of the pixel to be set |
| y | The Y coordinate of the pixel to be set |
| value | The value of the pixel to be set. |
Implements image.
Definition at line 57 of file monochrome.cc.
| const char * image_monochrome::type_name | ( | ) | 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 monochrome.cc.
pointer image_monochrome::deeper [private] |
The deeper instance variable is used to remember the image to be filtered.
Definition at line 82 of file monochrome.h.
1.7.6.1