2
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
4
// This program is free software; you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation; either version 3 of the License, or
7
// (at your option) any later version.
9
// This program is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// GNU General Public License for more details.
14
// You should have received a copy of the GNU General Public License
15
// along with this program; if not, write to the Free Software
16
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19
#include "as_object.h"
20
#include "GlowFilter.h"
22
#include "builtin_function.h"
24
// These _must_ be defined.
25
#define phelp_helper GlowFilter_as
26
#define phelp_class GlowFilter
27
#include "prophelper.h"
28
#include "BitmapFilter_as.h"
32
class GlowFilter_as : public as_object, public GlowFilter
44
phelp_i(bitmap_clone);
49
phelp_base_imp((bitmapFilter_interface()), GlowFilter)
51
// Filters are property based.
53
phelp_i_replace(clone, bitmap_clone);
57
phelp_gs_attach(color);
58
phelp_gs_attach(alpha);
59
phelp_gs_attach(blurX);
60
phelp_gs_attach(blurY);
61
phelp_gs_attach(strength);
62
phelp_gs_attach(quality);
63
phelp_gs_attach(inner);
64
phelp_gs_attach(knockout);
67
phelp_property(boost::uint32_t, number<boost::uint32_t>, color)
68
phelp_property(boost::uint8_t, number<boost::uint8_t>, alpha)
69
phelp_property(float, number<float>, blurX)
70
phelp_property(float, number<float>, blurY)
71
phelp_property(float, number<float>, strength)
72
phelp_property(boost::uint8_t, number<boost::uint8_t>, quality)
73
phelp_property(bool, bool, inner)
74
phelp_property(bool, bool, knockout)
76
easy_clone(GlowFilter_as)
79
GlowFilter_as::ctor(const fn_call& /*fn*/)
81
boost::intrusive_ptr<as_object> obj = new GlowFilter_as(GlowFilter_as::Interface());
82
GlowFilter_as::attachProperties(*obj);
84
return as_value(obj.get());