| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 5 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * Copyright (C) 2013 Google Inc. All rights reserved. | 7 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 , m_alphaFunc(alphaFunc) | 43 , m_alphaFunc(alphaFunc) |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 PassRefPtrWillBeRawPtr<FEComponentTransfer> FEComponentTransfer::create(Filter*
filter, const ComponentTransferFunction& redFunc, | 47 PassRefPtrWillBeRawPtr<FEComponentTransfer> FEComponentTransfer::create(Filter*
filter, const ComponentTransferFunction& redFunc, |
| 48 const ComponentTransferFunction& greenFunc, const ComponentTransferFunction&
blueFunc, const ComponentTransferFunction& alphaFunc) | 48 const ComponentTransferFunction& greenFunc, const ComponentTransferFunction&
blueFunc, const ComponentTransferFunction& alphaFunc) |
| 49 { | 49 { |
| 50 return adoptRefWillBeNoop(new FEComponentTransfer(filter, redFunc, greenFunc
, blueFunc, alphaFunc)); | 50 return adoptRefWillBeNoop(new FEComponentTransfer(filter, redFunc, greenFunc
, blueFunc, alphaFunc)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 ComponentTransferFunction FEComponentTransfer::redFunction() const | |
| 54 { | |
| 55 return m_redFunc; | |
| 56 } | |
| 57 | |
| 58 void FEComponentTransfer::setRedFunction(const ComponentTransferFunction& func) | |
| 59 { | |
| 60 m_redFunc = func; | |
| 61 } | |
| 62 | |
| 63 ComponentTransferFunction FEComponentTransfer::greenFunction() const | |
| 64 { | |
| 65 return m_greenFunc; | |
| 66 } | |
| 67 | |
| 68 void FEComponentTransfer::setGreenFunction(const ComponentTransferFunction& func
) | |
| 69 { | |
| 70 m_greenFunc = func; | |
| 71 } | |
| 72 | |
| 73 ComponentTransferFunction FEComponentTransfer::blueFunction() const | |
| 74 { | |
| 75 return m_blueFunc; | |
| 76 } | |
| 77 | |
| 78 void FEComponentTransfer::setBlueFunction(const ComponentTransferFunction& func) | |
| 79 { | |
| 80 m_blueFunc = func; | |
| 81 } | |
| 82 | |
| 83 ComponentTransferFunction FEComponentTransfer::alphaFunction() const | |
| 84 { | |
| 85 return m_alphaFunc; | |
| 86 } | |
| 87 | |
| 88 void FEComponentTransfer::setAlphaFunction(const ComponentTransferFunction& func
) | |
| 89 { | |
| 90 m_alphaFunc = func; | |
| 91 } | |
| 92 | |
| 93 static void identity(unsigned char*, const ComponentTransferFunction&) | 53 static void identity(unsigned char*, const ComponentTransferFunction&) |
| 94 { | 54 { |
| 95 } | 55 } |
| 96 | 56 |
| 97 static void table(unsigned char* values, const ComponentTransferFunction& transf
erFunction) | 57 static void table(unsigned char* values, const ComponentTransferFunction& transf
erFunction) |
| 98 { | 58 { |
| 99 const Vector<float>& tableValues = transferFunction.tableValues; | 59 const Vector<float>& tableValues = transferFunction.tableValues; |
| 100 unsigned n = tableValues.size(); | 60 unsigned n = tableValues.size(); |
| 101 if (n < 1) | 61 if (n < 1) |
| 102 return; | 62 return; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 ts << "{green: " << m_greenFunc << "}\n"; | 202 ts << "{green: " << m_greenFunc << "}\n"; |
| 243 writeIndent(ts, indent + 2); | 203 writeIndent(ts, indent + 2); |
| 244 ts << "{blue: " << m_blueFunc << "}\n"; | 204 ts << "{blue: " << m_blueFunc << "}\n"; |
| 245 writeIndent(ts, indent + 2); | 205 writeIndent(ts, indent + 2); |
| 246 ts << "{alpha: " << m_alphaFunc << "}]\n"; | 206 ts << "{alpha: " << m_alphaFunc << "}]\n"; |
| 247 inputEffect(0)->externalRepresentation(ts, indent + 1); | 207 inputEffect(0)->externalRepresentation(ts, indent + 1); |
| 248 return ts; | 208 return ts; |
| 249 } | 209 } |
| 250 | 210 |
| 251 } // namespace blink | 211 } // namespace blink |
| OLD | NEW |