• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2     Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3                   2004, 2005 Rob Buis <buis@kde.org>
4                   2005 Eric Seidel <eric@webkit.org>
5 
6     This library is free software; you can redistribute it and/or
7     modify it under the terms of the GNU Library General Public
8     License as published by the Free Software Foundation; either
9     version 2 of the License, or (at your option) any later version.
10 
11     This library 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 GNU
14     Library General Public License for more details.
15 
16     You should have received a copy of the GNU Library General Public License
17     aint with this library; see the file COPYING.LIB.  If not, write to
18     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19     Boston, MA 02110-1301, USA.
20 */
21 
22 #include "config.h"
23 
24 #if ENABLE(FILTERS)
25 #include "FEComponentTransfer.h"
26 
27 #include "Filter.h"
28 
29 namespace WebCore {
30 
FEComponentTransfer(FilterEffect * in,const ComponentTransferFunction & redFunc,const ComponentTransferFunction & greenFunc,const ComponentTransferFunction & blueFunc,const ComponentTransferFunction & alphaFunc)31 FEComponentTransfer::FEComponentTransfer(FilterEffect* in, const ComponentTransferFunction& redFunc,
32     const ComponentTransferFunction& greenFunc, const ComponentTransferFunction& blueFunc, const ComponentTransferFunction& alphaFunc)
33     : FilterEffect()
34     , m_in(in)
35     , m_redFunc(redFunc)
36     , m_greenFunc(greenFunc)
37     , m_blueFunc(blueFunc)
38     , m_alphaFunc(alphaFunc)
39 {
40 }
41 
create(FilterEffect * in,const ComponentTransferFunction & redFunc,const ComponentTransferFunction & greenFunc,const ComponentTransferFunction & blueFunc,const ComponentTransferFunction & alphaFunc)42 PassRefPtr<FEComponentTransfer> FEComponentTransfer::create(FilterEffect* in, const ComponentTransferFunction& redFunc,
43     const ComponentTransferFunction& greenFunc, const ComponentTransferFunction& blueFunc, const ComponentTransferFunction& alphaFunc)
44 {
45     return adoptRef(new FEComponentTransfer(in, redFunc, greenFunc, blueFunc, alphaFunc));
46 }
47 
redFunction() const48 ComponentTransferFunction FEComponentTransfer::redFunction() const
49 {
50     return m_redFunc;
51 }
52 
setRedFunction(const ComponentTransferFunction & func)53 void FEComponentTransfer::setRedFunction(const ComponentTransferFunction& func)
54 {
55     m_redFunc = func;
56 }
57 
greenFunction() const58 ComponentTransferFunction FEComponentTransfer::greenFunction() const
59 {
60     return m_greenFunc;
61 }
62 
setGreenFunction(const ComponentTransferFunction & func)63 void FEComponentTransfer::setGreenFunction(const ComponentTransferFunction& func)
64 {
65     m_greenFunc = func;
66 }
67 
blueFunction() const68 ComponentTransferFunction FEComponentTransfer::blueFunction() const
69 {
70     return m_blueFunc;
71 }
72 
setBlueFunction(const ComponentTransferFunction & func)73 void FEComponentTransfer::setBlueFunction(const ComponentTransferFunction& func)
74 {
75     m_blueFunc = func;
76 }
77 
alphaFunction() const78 ComponentTransferFunction FEComponentTransfer::alphaFunction() const
79 {
80     return m_alphaFunc;
81 }
82 
setAlphaFunction(const ComponentTransferFunction & func)83 void FEComponentTransfer::setAlphaFunction(const ComponentTransferFunction& func)
84 {
85     m_alphaFunc = func;
86 }
87 
apply(Filter *)88 void FEComponentTransfer::apply(Filter*)
89 {
90 }
91 
dump()92 void FEComponentTransfer::dump()
93 {
94 }
95 
96 } // namespace WebCore
97 
98 #endif // ENABLE(FILTERS)
99