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) 2010 Igalia, S.L. | 6 * Copyright (C) 2010 Igalia, S.L. |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * Copyright (C) 2013 Google Inc. All rights reserved. | 8 * Copyright (C) 2013 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, int indent) c
onst | 355 TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, int indent) c
onst |
356 { | 356 { |
357 writeIndent(ts, indent); | 357 writeIndent(ts, indent); |
358 ts << "[feGaussianBlur"; | 358 ts << "[feGaussianBlur"; |
359 FilterEffect::externalRepresentation(ts); | 359 FilterEffect::externalRepresentation(ts); |
360 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n"; | 360 ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n"; |
361 inputEffect(0)->externalRepresentation(ts, indent + 1); | 361 inputEffect(0)->externalRepresentation(ts, indent + 1); |
362 return ts; | 362 return ts; |
363 } | 363 } |
364 | 364 |
365 float FEGaussianBlur::calculateStdDeviation(float radius) | |
366 { | |
367 // Blur radius represents 2/3 times the kernel size, the dest pixel is half
of the radius applied 3 times | |
368 return max((radius * 2 / 3.f - 0.5f) / gaussianKernelFactor(), 0.f); | |
369 } | |
370 | |
371 } // namespace WebCore | 365 } // namespace WebCore |
OLD | NEW |