1 /* === S Y N F I G ========================================================= */
2 /*! \file layer_pastecanvas.h
3 ** \brief Template Header
5 ** $Id: layer_pastecanvas.h,v 1.2 2005/01/24 03:08:18 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_LAYER_PASTEIMAGE_H
25 #define __SYNFIG_LAYER_PASTEIMAGE_H
27 /* === H E A D E R S ======================================================= */
29 #include "layer_composite.h"
34 #include "canvasbase.h"
38 /* === M A C R O S ========================================================= */
40 /* === T Y P E D E F S ===================================================== */
42 /* === C L A S S E S & S T R U C T S ======================================= */
46 class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform
48 SYNFIG_LAYER_MODULE_EXT
53 etl::loose_handle<synfig::Canvas> canvas;
55 //! Recursion depth counter
62 mutable Time curr_time;
64 bool optimize_layers(synfig::Context context,synfig::CanvasBase&)const;
66 bool do_not_muck_with_time_;
72 sigc::connection child_changed_connection;
75 virtual void on_canvas_set();
77 void set_do_not_muck_with_time(bool x=true) { do_not_muck_with_time_=true; }
79 etl::handle<synfig::Canvas> get_sub_canvas()const { return canvas; }
80 void set_sub_canvas(etl::handle<synfig::Canvas> x);
82 Real get_zoom()const { return zoom; }
84 Time get_time_offset()const { return time_offset; }
86 Point get_origin()const { return origin; }
89 virtual ~Layer_PasteCanvas();
91 virtual String get_local_name()const;
93 virtual bool set_param(const String & param, const synfig::ValueBase &value);
95 virtual ValueBase get_param(const String & param)const;
97 virtual Color get_color(Context context, const Point &pos)const;
99 virtual void set_time(Context context, Time time)const;
101 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
103 virtual Vocab get_param_vocab()const;
105 virtual synfig::Rect get_bounding_rect()const;
107 virtual synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
110 virtual void get_times_vfunc(Node::time_set &set) const;
112 }; // END of class Layer_PasteCanvas
114 }; // END of namespace synfig
116 /* === E N D =============================================================== */