synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
cairolistimporter.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
23
/* ========================================================================= */
24
25
/* === S T A R T =========================================================== */
26
27
#ifndef __SYNFIG_CAIROLISTIMPORTER_H
28
#define __SYNFIG_CAIROLISTIMPORTER_H
29
30
/* === H E A D E R S ======================================================= */
31
32
#include "
cairoimporter.h
"
33
#include "
surface.h
"
34
#include <ETL/smart_ptr>
35
#include <vector>
36
#include <list>
37
#include <utility>
38
39
/* === M A C R O S ========================================================= */
40
41
/* === T Y P E D E F S ===================================================== */
42
43
/* === C L A S S E S & S T R U C T S ======================================= */
44
45
namespace
synfig {
46
50
class
CairoListImporter
:
public
CairoImporter
51
{
52
SYNFIG_CAIROIMPORTER_MODULE_EXT
53
public
:
54
class
CacheElement
55
{
56
public
:
57
String
frame_name
;
58
cairo_surface_t*
surface
;
59
CacheElement
()
60
{
61
surface
=NULL;
62
}
63
//Copy constructor
64
CacheElement
(
const
CacheElement
& other):
frame_name
(other.
frame_name
),
surface
(cairo_surface_reference(other.
surface
))
65
{
66
}
67
~CacheElement
()
68
{
69
if
(
surface
)
70
cairo_surface_destroy(
surface
);
71
}
72
};
73
74
private
:
75
float
fps;
76
std::vector<String> filename_list;
77
std::list<CacheElement> frame_cache;
78
79
public
:
80
81
CairoListImporter
(
const
FileSystem::Identifier
&
identifier
);
82
~CairoListImporter
();
83
84
virtual
bool
get_frame
(cairo_surface_t *&csurface,
const
RendDesc
&renddesc,
Time
time,
ProgressCallback
*callback=NULL);
85
86
virtual
bool
is_animated
();
87
88
};
89
90
};
// END of namespace synfig
91
92
/* === E N D =============================================================== */
93
94
#endif
Generated on Mon Nov 16 2015 15:33:37 for synfig-core by
1.8.1.2