Gnash
0.8.11dev
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libcore
MorphShape.h
Go to the documentation of this file.
1
// MorphShape.h: the MorphShape DisplayObject implementation for Gnash.
2
//
3
// Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
4
// Free Software Foundation, Inc
5
//
6
// This program is free software; you can redistribute it and/or modify
7
// it under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// This program is distributed in the hope that it will be useful,
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
// GNU General Public License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program; if not, write to the Free Software
18
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
20
#ifndef GNASH_MORPH_SHAPE_H
21
#define GNASH_MORPH_SHAPE_H
22
23
#include "
DisplayObject.h
"
24
#include "
swf/DefineMorphShapeTag.h
"
25
#include <boost/intrusive_ptr.hpp>
26
#include <cassert>
27
28
namespace
gnash {
29
class
Renderer;
30
}
31
32
namespace
gnash {
33
35
//
39
//
45
//
48
class
MorphShape
:
public
DisplayObject
49
{
50
51
public
:
52
53
MorphShape
(
movie_root
& mr,
as_object
*
object
,
54
const
SWF::DefineMorphShapeTag
* def,
DisplayObject
*
parent
);
55
56
virtual
void
display
(
Renderer
& renderer,
const
Transform
& xform);
57
58
virtual
SWFRect
getBounds
()
const
;
59
60
virtual
bool
pointInShape
(boost::int32_t
x
, boost::int32_t
y
)
const
;
61
62
const
SWF::ShapeRecord
&
shape
()
const
{
63
return
_shape;
64
}
65
66
private
:
67
68
void
morph();
69
70
double
currentRatio()
const
;
71
72
const
boost::intrusive_ptr<const SWF::DefineMorphShapeTag> _def;
73
74
SWF::ShapeRecord
_shape;
75
76
};
77
78
79
}
// namespace gnash
80
81
82
#endif
83
84
85
// Local Variables:
86
// mode: C++
87
// indent-tabs-mode: t
88
// End:
Generated on Wed Oct 23 2013 11:31:09 for Gnash by
1.8.4