synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
modules
mod_png
mptr_png.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
25
/* === S T A R T =========================================================== */
26
27
#ifndef __SYNFIG_MPTR_PNG_H
28
#define __SYNFIG_MPTR_PNG_H
29
30
/* === H E A D E R S ======================================================= */
31
32
#include <png.h>
33
#include <
synfig/importer.h
>
34
#include <
synfig/string.h
>
35
#include <
synfig/surface.h
>
36
37
/* === M A C R O S ========================================================= */
38
39
/* === T Y P E D E F S ===================================================== */
40
41
/* === C L A S S E S & S T R U C T S ======================================= */
42
43
class
png_mptr
:
public
synfig::Importer
44
{
45
SYNFIG_IMPORTER_MODULE_EXT
46
private
:
47
synfig::Surface
surface_buffer;
48
49
bool
trim;
50
unsigned
int
orig_width, orig_height, trimmed_x, trimmed_y;
51
52
static
void
png_out_error(png_struct *png_data,
const
char
*msg);
53
static
void
png_out_warning(png_struct *png_data,
const
char
*msg);
54
static
void
read_callback(png_structp png_ptr, png_bytep out_bytes, png_size_t bytes_count_to_read);
55
56
public
:
57
png_mptr
(
const
synfig::FileSystem::Identifier
&
identifier
);
58
~png_mptr
();
59
60
virtual
bool
get_frame
(
synfig::Surface
&surface,
const
synfig::RendDesc
&renddesc,
synfig::Time
time,
synfig::ProgressCallback
*callback);
61
virtual
bool
get_frame
(
synfig::Surface
&surface,
const
synfig::RendDesc
&renddesc,
synfig::Time
time,
62
bool
&trimmed,
unsigned
int
&width,
unsigned
int
&height,
unsigned
int
&top,
unsigned
int
&left,
63
synfig::ProgressCallback
*callback);
64
};
65
66
/* === E N D =============================================================== */
67
68
#endif
Generated on Mon Nov 16 2015 15:33:47 for synfig-core by
1.8.1.2