1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: transform.h,v 1.1.1.1 2005/01/04 01:23:15 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_TRANSFORM_H
25 #define __SYNFIG_TRANSFORM_H
27 /* === H E A D E R S ======================================================= */
35 /* === M A C R O S ========================================================= */
37 /* === T Y P E D E F S ===================================================== */
39 /* === C L A S S E S & S T R U C T S ======================================= */
43 class Transform : public etl::shared_object
48 typedef etl::handle<Transform> Handle;
51 Transform(const GUID& guid=GUID(0)):guid_(guid) { }
55 const GUID& get_guid()const { return guid_; }
57 virtual ~Transform() { }
58 virtual synfig::Vector perform(const synfig::Vector& x)const=0;
59 virtual synfig::Vector unperform(const synfig::Vector& x)const=0;
61 virtual synfig::Rect perform(const synfig::Rect& x)const;
62 virtual synfig::Rect unperform(const synfig::Rect& x)const;
64 }; // END of class Transform
66 class TransformStack : public std::list<Transform::Handle>
71 synfig::Vector perform(const synfig::Vector& x)const;
72 synfig::Vector unperform(const synfig::Vector& x)const;
74 synfig::Rect perform(const synfig::Rect& x)const;
75 synfig::Rect unperform(const synfig::Rect& x)const;
77 void push(const Transform::Handle& x) { if(x)push_back(x); }
78 void pop() { pop_back(); }
79 }; // END of class TransformStack
81 }; // END of namespace synfig
83 /* === E N D =============================================================== */