Drop the bool operator for ObjectURI, to avoid getting the kind of side-effect that...
[gnash.git] / libcore / parser / BitmapMovieDefinition.cpp
blobc6f8f7d6702b1e38968b3f59a116e0a9143801ea
1 // BitmapMovieDefinition.cpp: Bitmap movie definition, for Gnash.
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include "smart_ptr.h" // GNASH_USE_GC
21 #include "BitmapMovie.h"
22 #include "BitmapMovieDefinition.h"
23 #include "Geometry.h" // for class path and class edge
24 #include "GnashImage.h"
25 #include "log.h"
26 #include "Bitmap.h"
27 #include "Renderer.h"
28 #include "Global_as.h"
29 #include "namedStrings.h"
30 #include "CachedBitmap.h"
32 namespace gnash {
34 Movie*
35 BitmapMovieDefinition::createMovie(Global_as& gl, DisplayObject* parent)
37 as_object* o = getObjectWithPrototype(gl, NSV::CLASS_MOVIE_CLIP);
38 return new BitmapMovie(o, this, parent);
41 BitmapMovieDefinition::BitmapMovieDefinition(
42 std::auto_ptr<image::GnashImage> image,
43 Renderer* renderer, const std::string& url)
45 _version(6),
46 _framesize(0, 0, image->width()*20, image->height()*20),
47 _framecount(1),
48 _framerate(12),
49 _url(url),
50 _bytesTotal(image->size()),
51 _bitmap(renderer ? renderer->createCachedBitmap(image) : 0)
55 DisplayObject*
56 BitmapMovieDefinition::createDisplayObject(Global_as& /*gl*/,
57 DisplayObject* /*parent*/) const
59 std::abort();
60 return 0;
63 } // namespace gnash