/* === S Y N F I G ========================================================= */
/*! \file import.cpp
-** \brief Image Import Layer Implementation
+** \brief Implementation of the "Import Image" layer
**
** $Id$
**
SYNFIG_LAYER_INIT(Import);
SYNFIG_LAYER_SET_NAME(Import,"import");
-SYNFIG_LAYER_SET_LOCAL_NAME(Import,_("Import Image"));
-SYNFIG_LAYER_SET_CATEGORY(Import,_("Other"));
+SYNFIG_LAYER_SET_LOCAL_NAME(Import,N_("Import Image"));
+SYNFIG_LAYER_SET_CATEGORY(Import,N_("Other"));
SYNFIG_LAYER_SET_VERSION(Import,"0.1");
SYNFIG_LAYER_SET_CVS_ID(Import,"$Id$");
}
surface.clear();
- if(!newimporter->get_frame(surface,Time(0)))
+ if(!newimporter->get_frame(surface,Time(0),trimmed,width,height,top,left))
{
synfig::warning(strprintf("Unable to get frame from \"%s\"",filename_with_path.c_str()));
}
void
Import::set_time(Context context, Time time)const
{
- if(get_amount() && importer && importer->is_animated())importer->get_frame(surface,time+time_offset);
- //else surface.clear();
+ if(get_amount() && importer &&
+ importer->is_animated())
+ importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left);
+
context.set_time(time);
}
void
Import::set_time(Context context, Time time, const Point &pos)const
{
- if(get_amount() && importer && importer->is_animated())importer->get_frame(surface,time+time_offset);
- //else surface.clear();
+ if(get_amount() && importer &&
+ importer->is_animated())
+ importer->get_frame(surface,time+time_offset,trimmed,width,height,top,left);
+
context.set_time(time,pos);
}