Canola
0.8.D001
|
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_PROGRAM_CARD_FUNCTOR_IMAGE_PS_H 00019 #define LIB_PROGRAM_CARD_FUNCTOR_IMAGE_PS_H 00020 00021 #include <string> 00022 #include <cairomm/context.h> 00023 #include <cairomm/surface.h> 00024 00025 #include <lib/program_card/functor/image.h> 00026 00031 class program_card_functor_image_ps: 00032 public program_card_functor_image 00033 { 00034 public: 00038 virtual ~program_card_functor_image_ps(); 00039 00049 static pointer create(const std::string &filename); 00050 00051 // See base class for documentation. 00052 void operator()(unsigned card_num, unsigned card_count, 00053 const unsigned char *data, size_t data_size); 00054 00055 private: 00063 program_card_functor_image_ps(const std::string &filename); 00064 00069 std::string filename; 00070 00071 Cairo::RefPtr<Cairo::Surface> img; 00072 00073 Cairo::RefPtr<Cairo::Context> cr; 00074 00079 program_card_functor_image_ps(); 00080 00088 program_card_functor_image_ps(const program_card_functor_image_ps &rhs); 00089 00097 program_card_functor_image_ps &operator=( 00098 const program_card_functor_image_ps &rhs); 00099 }; 00100 00101 #endif // LIB_PROGRAM_CARD_FUNCTOR_IMAGE_PS_H