00001 /* === S Y N F I G ========================================================= */ 00022 /* ========================================================================= */ 00023 00024 /* === S T A R T =========================================================== */ 00025 00026 #ifndef __SYNFIG_LAYER_PASTEIMAGE_H 00027 #define __SYNFIG_LAYER_PASTEIMAGE_H 00028 00029 /* === H E A D E R S ======================================================= */ 00030 00031 #include "layer_composite.h" 00032 #include "color.h" 00033 #include "vector.h" 00034 #include "real.h" 00035 #include "time.h" 00036 #include "canvasbase.h" 00037 #include "canvas.h" 00038 #include "rect.h" 00039 00040 /* === M A C R O S ========================================================= */ 00041 00042 /* === T Y P E D E F S ===================================================== */ 00043 00044 /* === C L A S S E S & S T R U C T S ======================================= */ 00045 00046 namespace synfig { 00047 00048 class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform 00049 { 00050 SYNFIG_LAYER_MODULE_EXT 00051 private: 00052 00053 Vector origin; 00054 00055 etl::loose_handle<synfig::Canvas> canvas; 00056 00058 mutable int depth; 00059 00060 Real zoom; 00061 00062 Time time_offset; 00063 00064 mutable Time curr_time; 00065 00066 bool muck_with_time_; 00067 00068 bool children_lock; 00069 00070 mutable Rect bounds; 00071 00072 sigc::connection child_changed_connection; 00073 public: 00074 00075 virtual void on_canvas_set(); 00076 00077 void set_muck_with_time(bool x=false) { muck_with_time_=x; } 00078 00079 etl::handle<synfig::Canvas> get_sub_canvas()const { return canvas; } 00080 void set_sub_canvas(etl::handle<synfig::Canvas> x); 00081 00082 Real get_zoom()const { return zoom; } 00083 00084 Time get_time_offset()const { return time_offset; } 00085 00086 Point get_origin()const { return origin; } 00087 00088 Layer_PasteCanvas(); 00089 virtual ~Layer_PasteCanvas(); 00090 00091 virtual String get_local_name()const; 00092 00093 virtual bool set_param(const String & param, const synfig::ValueBase &value); 00094 00095 virtual ValueBase get_param(const String & param)const; 00096 00097 virtual Color get_color(Context context, const Point &pos)const; 00098 00099 virtual void set_time(Context context, Time time)const; 00100 00101 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const; 00102 00103 virtual Vocab get_param_vocab()const; 00104 00105 virtual synfig::Rect get_bounding_rect()const; 00106 00107 virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const; 00108 00109 protected: 00110 virtual void get_times_vfunc(Node::time_set &set) const; 00111 00112 }; // END of class Layer_PasteCanvas 00113 00114 }; // END of namespace synfig 00115 00116 /* === E N D =============================================================== */ 00117 00118 #endif