- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# trgt_mng.h

Go to the documentation of this file.

    00001
    00021 /* === S T A R T =========================================================== */
    00022
    00023 #ifndef __SYNFIG_TRGT_MNG_H
    00024 #define __SYNFIG_TRGT_MNG_H
    00025
    00026 /* === H E A D E R S ======================================================= */
    00027
    00028 #include <synfig/target_scanline.h>
    00029 #include <synfig/string.h>
    00030 #include <cstdio>
    00031
    00032 // #include <png.h>
    00033 // #include <jpeglib.h>
    00034
    00035 #if !defined(MNG_SUPPORT_FULL)
    00036 #define MNG_SUPPORT_FULL 1
    00037 #endif
    00038
    00039 #if !defined(MNG_SUPPORT_READ)
    00040 #define MNG_SUPPORT_READ 1
    00041 #endif
    00042
    00043 #if !defined(MNG_SUPPORT_WRITE)
    00044 #define MNG_SUPPORT_WRITE 1
    00045 #endif
    00046
    00047 #if !defined(MNG_SUPPORT_DISPLAY)
    00048 #define MNG_SUPPORT_DISPLAY 1
    00049 #endif
    00050
    00051 #if !defined(MNG_ACCESS_CHUNKS)
    00052 #define MNG_ACCESS_CHUNKS 1
    00053 #endif
    00054
    00055 #include <libmng.h>
    00056
    00057 /* === M A C R O S ========================================================= */
    00058
    00059 /* === T Y P E D E F S ===================================================== */
    00060
    00061 /* === C L A S S E S & S T R U C T S ======================================= */
    00062
    00063 class mng_trgt : public synfig::Target_Scanline
    00064 {
    00065     SYNFIG_TARGET_MODULE_EXT
    00066
    00067 private:
    00068
    00069     FILE *file;
    00070     int w,h;
    00071     mng_handle mng;
    00072
    00073     bool multi_image,ready;
    00074     int imagecount;
    00075     synfig::String filename;
    00076     unsigned char *buffer;
    00077     synfig::Color *color_buffer;
    00078
    00079     z_stream zstream;
    00080     unsigned char* zbuffer;
    00081     unsigned int zbuffer_len;
    00082
    00083 public:
    00084
    00085     mng_trgt(const char *filename);
    00086     virtual ~mng_trgt();
    00087
    00088     virtual bool set_rend_desc(synfig::RendDesc *desc);
    00089     virtual bool init();
    00090     virtual bool start_frame(synfig::ProgressCallback *cb);
    00091     virtual void end_frame();
    00092
    00093     virtual synfig::Color * start_scanline(int scanline);
    00094     virtual bool end_scanline();
    00095 };
    00096
    00097 /* === E N D =============================================================== */
    00098
    00099 #endif