|
synfig-core
1.0.3
|
Used for importing bitmaps of various formats, including animations. More...
#include <cairoimporter.h>
Classes | |
| struct | BookEntry |
Public Types | |
| typedef CairoImporter *(* | Factory )(const FileSystem::Identifier &identifier) |
| typedef std::map< std::string, BookEntry > | Book |
| typedef etl::handle < CairoImporter > | Handle |
| typedef etl::loose_handle < CairoImporter > | LooseHandle |
| typedef etl::handle< const CairoImporter > | ConstHandle |
Public Member Functions | |
| Gamma & | gamma () |
| const Gamma & | gamma () const |
| virtual | ~CairoImporter () |
| virtual bool | get_frame (cairo_surface_t *&csurface, const RendDesc &renddesc, Time time, ProgressCallback *callback=NULL)=0 |
| Gets a frame and puts it into cairo_surface_t. | |
| virtual bool | get_frame (cairo_surface_t *&csurface, const RendDesc &renddesc, Time time, bool &trimmed __attribute__((unused)), unsigned int &width __attribute__((unused)), unsigned int &height __attribute__((unused)), unsigned int &top __attribute__((unused)), unsigned int &left __attribute__((unused)), ProgressCallback *callback=NULL) |
| virtual bool | is_animated () |
Returns true if the importer pays attention to the time parameter of get_frame() | |
Static Public Member Functions | |
| static Book & | book () |
| static bool | subsys_init () |
| static bool | subsys_stop () |
| static Handle | open (const FileSystem::Identifier &identifier) |
| Attempts to open filename, and returns a handle to the associated CairoImporter. | |
Public Attributes | |
| const FileSystem::Identifier | identifier |
Static Public Attributes | |
| static Book * | book_ |
Protected Member Functions | |
| CairoImporter (const FileSystem::Identifier &identifier) | |
Used for importing bitmaps of various formats, including animations.
It is the base class for all the importers for CairoSurfaces. It has a static Book pointer class that is a map for the importers factory creators and the strings of the extension that the importer can understand. It allows to create the a pointer to a particular importer just by using the extension of the name of file to import. Also it creates a virtual member get_frame that must be declared in the inherited classes.
| typedef CairoImporter*(* synfig::CairoImporter::Factory)(const FileSystem::Identifier &identifier) |
Type that represents a pointer to a CairoImporter's constructor. As a pointer to the constructor, it represents a "factory" of importers.
| typedef std::map<std::string,BookEntry> synfig::CairoImporter::Book |
| typedef etl::handle<CairoImporter> synfig::CairoImporter::Handle |
| typedef etl::loose_handle<CairoImporter> synfig::CairoImporter::LooseHandle |
| typedef etl::handle<const CairoImporter> synfig::CairoImporter::ConstHandle |
|
protected |
|
virtual |
References __open_cairoimporters.
|
static |
References book_.
Referenced by synfig::Main::Main().
|
static |
Initializes the CairoImport module by creating a book of importers names and its creators and the list of open importers
References __open_cairoimporters, and book_.
Referenced by synfig::Main::Main().
|
static |
Stops the Import module by deleting the book and the list of open importers
References __open_cairoimporters, and book_.
Referenced by synfig::Main::Main(), and synfig::Main::~Main().
|
inline |
Referenced by cairo_png_mptr::cairo_png_mptr().
|
inline |
|
pure virtual |
Gets a frame and puts it into cairo_surface_t.
| surface | Reference to surface to put frame into |
| time | For animated importers, determines which frame to get. For static importers, this parameter is unused. |
| callback | Pointer to callback class for progress, errors, etc. |
true on success, false on error Implemented in synfig::CairoListImporter, and cairo_png_mptr.
Referenced by get_frame().
|
inlinevirtual |
References get_frame().
|
inlinevirtual |
Returns true if the importer pays attention to the time parameter of get_frame()
Reimplemented in synfig::CairoListImporter.
|
static |
Attempts to open filename, and returns a handle to the associated CairoImporter.
References _, __open_cairoimporters, synfig::error(), synfig::FileSystem::Identifier::filename, and tolower.
Referenced by synfig::CairoListImporter::get_frame().
|
static |
| const FileSystem::Identifier synfig::CairoImporter::identifier |
1.8.1.2