marked stable
[synfig.git] / synfig-core / tags / stable / src / modules / mod_bmp / trgt_bmp.h
1 /* === S I N F G =========================================================== */
2 /*!     \file trgt_bmp.h
3 **      \brief Template Header
4 **
5 **      $Id: trgt_bmp.h,v 1.1.1.1 2005/01/04 01:23:10 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SINFG_TRGT_BMP_H
25 #define __SINFG_TRGT_BMP_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <sinfg/target_scanline.h>
30 #include <sinfg/string.h>
31 #include <cstdio>
32
33 /* === M A C R O S ========================================================= */
34
35 /* === T Y P E D E F S ===================================================== */
36
37 /* === C L A S S E S & S T R U C T S ======================================= */
38
39 class bmp : public sinfg::Target_Scanline
40 {
41         SINFG_TARGET_MODULE_EXT
42 private:
43         int rowspan;
44         int imagecount;
45         bool multi_image;
46         FILE *file;
47         sinfg::String filename;
48         unsigned char *buffer;
49         sinfg::Color *color_buffer;
50         sinfg::PixelFormat pf;
51
52 public:
53         bmp(const char *filename);
54         virtual ~bmp();
55
56         virtual bool set_rend_desc(sinfg::RendDesc *desc);
57         virtual bool start_frame(sinfg::ProgressCallback *cb);
58         virtual void end_frame();
59         virtual sinfg::Color * start_scanline(int scanline);
60         virtual bool end_scanline();
61
62 };
63
64 /* === E N D =============================================================== */
65
66 #endif