1 /*! ========================================================================
3 ** Template Header File
4 ** $Id: warp.h,v 1.2 2005/01/24 05:00:18 darco Exp $
6 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
8 ** This software and associated documentation
9 ** are CONFIDENTIAL and PROPRIETARY property of
10 ** the above-mentioned copyright holder.
12 ** You may not copy, print, publish, or in any
13 ** other way distribute this software without
14 ** a prior written agreement with
15 ** the copyright holder.
17 ** === N O T E S ===========================================================
19 ** ========================================================================= */
21 /* === S T A R T =========================================================== */
23 #ifndef __SYNFIG_WARP_H
24 #define __SYNFIG_WARP_H
26 /* === H E A D E R S ======================================================= */
28 #include <synfig/vector.h>
29 #include <synfig/angle.h>
30 #include <synfig/layer.h>
31 #include <synfig/rect.h>
33 /* === M A C R O S ========================================================= */
35 /* === T Y P E D E F S ===================================================== */
37 /* === C L A S S E S & S T R U C T S ======================================= */
39 using namespace synfig;
44 class Warp : public Layer
46 SYNFIG_LAYER_MODULE_EXT
47 friend class Warp_Trans;
50 Point src_tl,src_br,dest_tl,dest_tr,dest_bl,dest_br;
54 Real cache_a,cache_b,cache_c,cache_d,cache_e,cache_f,cache_i,cache_j;
57 Real inv_matrix[3][3];
59 Point transform_forward(const Point& p)const;
60 Point transform_backward(const Point& p)const;
62 Real transform_forward_z(const Point& p)const;
63 Real transform_backward_z(const Point& p)const;
73 virtual synfig::Rect get_full_bounding_rect(synfig::Context context)const;
74 virtual synfig::Rect get_bounding_rect()const;
76 virtual bool set_param(const synfig::String & param, const synfig::ValueBase &value);
77 virtual ValueBase get_param(const synfig::String & param)const;
78 virtual Color get_color(Context context, const Point &pos)const;
79 virtual bool accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc, ProgressCallback *cb)const;
80 synfig::Layer::Handle hit_check(synfig::Context context, const synfig::Point &point)const;
81 virtual Vocab get_param_vocab()const;
82 virtual etl::handle<synfig::Transform> get_transform()const;
85 /* === E N D =============================================================== */