synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
transform.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
21
/* ========================================================================= */
22
23
/* === S T A R T =========================================================== */
24
25
#ifndef __SYNFIG_TRANSFORM_H
26
#define __SYNFIG_TRANSFORM_H
27
28
/* === H E A D E R S ======================================================= */
29
30
#include <ETL/handle>
31
#include "
vector.h
"
32
#include <list>
33
#include "
rect.h
"
34
#include "
guid.h
"
35
36
/* === M A C R O S ========================================================= */
37
38
/* === T Y P E D E F S ===================================================== */
39
40
/* === C L A S S E S & S T R U C T S ======================================= */
41
42
namespace
synfig {
43
44
class
Transform
:
public
etl::shared_object
45
{
46
GUID
guid_;
47
48
public
:
49
typedef
etl::handle<Transform>
Handle
;
50
51
protected
:
52
Transform
(
const
GUID
& guid):guid_(guid) { }
53
54
public
:
55
56
const
GUID
&
get_guid
()
const
{
return
guid_; }
57
58
virtual
~Transform
() { }
59
virtual
synfig::Vector
perform
(
const
synfig::Vector
& x)
const
=0;
60
virtual
synfig::Vector
unperform
(
const
synfig::Vector
& x)
const
=0;
61
62
virtual
synfig::Rect
perform
(
const
synfig::Rect
& x)
const
;
63
virtual
synfig::Rect
unperform
(
const
synfig::Rect
& x)
const
;
64
65
virtual
String
get_string
()
const
=0;
66
67
};
// END of class Transform
68
69
class
TransformStack
:
public
std::list<Transform::Handle>
70
{
71
public
:
72
GUID
get_guid
()
const
;
73
74
synfig::Vector
perform
(
const
synfig::Vector
& x)
const
;
75
synfig::Vector
unperform
(
const
synfig::Vector
& x)
const
;
76
77
synfig::Rect
perform
(
const
synfig::Rect
& x)
const
;
78
synfig::Rect
unperform
(
const
synfig::Rect
& x)
const
;
79
80
void
push
(
const
Transform::Handle
& x) {
if
(x)push_back(x); }
81
void
pop
() { pop_back(); }
82
};
// END of class TransformStack
83
84
};
// END of namespace synfig
85
86
/* === E N D =============================================================== */
87
88
#endif
Generated on Mon Nov 16 2015 15:33:52 for synfig-core by
1.8.1.2