Use LinkableValueNode members functions when possible in the derived valuenodes.
[synfig.git] / synfig-core / src / modules / mod_magickpp / trgt_magickpp.h
1 /*! ========================================================================
2 ** Synfig
3 **
4 **      Copyright (c) 2007 Chris Moore
5 **
6 **      This package is free software; you can redistribute it and/or
7 **      modify it under the terms of the GNU General Public License as
8 **      published by the Free Software Foundation; either version 2 of
9 **      the License, or (at your option) any later version.
10 **
11 **      This package is distributed in the hope that it will be useful,
12 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
13 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 **      General Public License for more details.
15 **
16 ** === N O T E S ===========================================================
17 **
18 ** ========================================================================= */
19
20 /* === S T A R T =========================================================== */
21
22 #ifndef __SYNFIG_TRGT_MAGICKPP_H
23 #define __SYNFIG_TRGT_MAGICKPP_H
24
25 /* === H E A D E R S ======================================================= */
26
27 #include <synfig/target_scanline.h>
28 #include <synfig/string.h>
29 #include <synfig/targetparam.h>
30 #include <cstdio>
31
32 #include <vector>
33 #include <Magick++.h>
34
35 /* === M A C R O S ========================================================= */
36
37 /* === T Y P E D E F S ===================================================== */
38
39 /* === C L A S S E S & S T R U C T S ======================================= */
40
41 class magickpp_trgt : public synfig::Target_Scanline
42 {
43         SYNFIG_TARGET_MODULE_EXT
44
45 private:
46
47         int width, height;
48
49         synfig::String filename;
50         unsigned char *buffer1, *start_pointer, *buffer_pointer;
51         unsigned char *buffer2, *previous_buffer_pointer;
52         bool transparent;
53         synfig::Color *color_buffer;
54         std::vector<Magick::Image> images;
55
56 public:
57
58         magickpp_trgt(const char *filename,
59                                   const synfig::TargetParam& /* params */) :
60                 filename(filename) { }
61         virtual ~magickpp_trgt();
62
63         virtual bool set_rend_desc(synfig::RendDesc *desc);
64         virtual bool init();
65
66         virtual bool start_frame(synfig::ProgressCallback *cb);
67         virtual void end_frame();
68
69         virtual synfig::Color* start_scanline(int scanline);
70         virtual bool end_scanline();
71 };
72
73 /* === E N D =============================================================== */
74
75 #endif