1 /* === S Y N F I G ========================================================= */
2 /*! \file layer_pastecanvas.h
3 ** \brief Header file for implementation of the "Paste Canvas" layer
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 ** Copyright (c) 2007 Chris Moore
11 ** This package is free software; you can redistribute it and/or
12 ** modify it under the terms of the GNU General Public License as
13 ** published by the Free Software Foundation; either version 2 of
14 ** the License, or (at your option) any later version.
16 ** This package is distributed in the hope that it will be useful,
17 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ** General Public License for more details.
22 /* ========================================================================= */
24 /* === S T A R T =========================================================== */
26 #ifndef __SYNFIG_LAYER_PASTEIMAGE_H
27 #define __SYNFIG_LAYER_PASTEIMAGE_H
29 /* === H E A D E R S ======================================================= */
31 #include "layer_composite.h"
36 #include "canvasbase.h"
40 /* === M A C R O S ========================================================= */
42 /* === T Y P E D E F S ===================================================== */
44 /* === C L A S S E S & S T R U C T S ======================================= */
48 class Layer_PasteCanvas : public Layer_Composite, public Layer_NoDeform
50 SYNFIG_LAYER_MODULE_EXT
55 etl::loose_handle<synfig::Canvas> canvas;
57 //! Recursion depth counter
64 mutable Time curr_time;
72 sigc::connection child_changed_connection;
75 virtual void on_canvas_set();
77 void set_muck_with_time(bool x=false) { muck_with_time_=x; }
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 =============================================================== */