FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
RootCreateImage.hpp
1 /*
2  * Copyright 2011, 2012 Lukas Jirkovsky
3  *
4  * This file is part of FotoSHOCKcore.
5  *
6  * FotoSHOCKcore is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, version 3 of the License.
9  *
10  * FotoSHOCKcore is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with FotoSHOCKcore. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef ROOTCREATEIMAGE_H
20 #define ROOTCREATEIMAGE_H
21 
22 #include "ImageOperation.hpp"
23 
24 namespace FotoSHOCKcore {
25 
27 
35  public:
37  RootCreateImage(FotoSHOCKcore::PixelData format, unsigned int width, unsigned int height, const std::string color);
38 
39  void prepare(FotoSHOCKcore::PixelData format, unsigned int width, unsigned int height, const std::string color);
40 
41  // ImageOperationDescriptor
42  virtual const char* name() { return "Root"; }
43  virtual const char* description() { return "An image source."; }
44  virtual ImageOperation* operation();
45  virtual InputProto inputPrototype() { InputProto tmp; return tmp; }
48  OutputProto proto;
50  return proto;
51  }
52 
53  // ImageOperation
54  virtual void runOperation(const Inputs& sources, const Outputs& dest, vector<UpdateInfo>& ROI, const long int stamp);
55  virtual bool isPrepared();
56  virtual void serialize(XmlSerializer& serializer);
57  private:
58  bool m_prepared;
59  PixelData m_format;
60  unsigned int m_width;
61  unsigned int m_height;
62  std::string m_color;
63 };
64 
65 }
66 
67 #endif // ROOTLOADIMAGE_H