layer_pastecanvas.h

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

Generated on Wed Aug 15 05:00:23 2007 for synfig by  doxygen 1.5.3