Canola  0.8.D001
lib/image/monochrome.h
Go to the documentation of this file.
00001 //
00002 // canola - canon canola 1614p emulator
00003 // Copyright (C) 2011 Peter Miller
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License, version 3, as
00007 // published by the Free Software Foundation.
00008 //
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License along
00015 // with this program. If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 
00018 #ifndef LIB_IMAGE_MONOCHROME_H
00019 #define LIB_IMAGE_MONOCHROME_H
00020 
00021 #include <lib/image.h>
00022 
00027 class image_monochrome:
00028     public image
00029 {
00030 public:
00034     virtual ~image_monochrome();
00035 
00036 private:
00044     image_monochrome(const pointer &deeper);
00045 
00046 protected:
00047     // See base class for documentation.
00048     const char *type_name() const;
00049 
00050     // See base class for documentation.
00051     void get_pixel(int x, int y, icon_pixel &value) const;
00052 
00053     // See base class for documentation.
00054     void set_pixel(int x, int y, const icon_pixel &value);
00055 
00056     // See base class for documentation.
00057     unsigned get_width() const;
00058 
00059     // See base class for documentation.
00060     unsigned get_height() const;
00061 
00062     // See base class for documentation.
00063     void save_to_file(const std::string &filename) const;
00064 
00065 public:
00073     static pointer create(const pointer &deeper);
00074 
00075 protected:
00076 
00077 private:
00082     pointer deeper;
00083 
00087     image_monochrome();
00088 
00092     image_monochrome(const image_monochrome &);
00093 
00097     image_monochrome &operator=(const image_monochrome &);
00098 };
00099 
00100 #endif // LIB_IMAGE_MONOCHROME_H