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

#include <monochrome.h>

Inheritance diagram for image_monochrome:
image

List of all members.

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_monochromeoperator= (const image_monochrome &)

Private Attributes

pointer deeper

Detailed Description

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.


Constructor & Destructor Documentation

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.

Parameters:
deeperThe image to be filtered.

Definition at line 26 of file monochrome.cc.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

image::pointer image_monochrome::create ( const pointer deeper) [static]

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

Parameters:
deeperThe 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.

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 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.

Parameters:
filenameThe 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.

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 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.


Member Data Documentation

The deeper instance variable is used to remember the image to be filtered.

Definition at line 82 of file monochrome.h.


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