2 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library 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 GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef FEDropShadow_h
22 #define FEDropShadow_h
24 #include "platform/graphics/Color.h"
25 #include "platform/graphics/filters/Filter.h"
26 #include "platform/graphics/filters/FilterEffect.h"
30 class PLATFORM_EXPORT FEDropShadow : public FilterEffect {
32 static PassRefPtr<FEDropShadow> create(Filter*, float, float, float, float, const Color&, float);
34 float stdDeviationX() const { return m_stdX; }
35 void setStdDeviationX(float stdX) { m_stdX = stdX; }
37 float stdDeviationY() const { return m_stdY; }
38 void setStdDeviationY(float stdY) { m_stdY = stdY; }
40 float dx() const { return m_dx; }
41 void setDx(float dx) { m_dx = dx; }
43 float dy() const { return m_dy; }
44 void setDy(float dy) { m_dy = dy; }
46 Color shadowColor() const { return m_shadowColor; }
47 void setShadowColor(const Color& shadowColor) { m_shadowColor = shadowColor; }
49 float shadowOpacity() const { return m_shadowOpacity; }
50 void setShadowOpacity(float shadowOpacity) { m_shadowOpacity = shadowOpacity; }
52 virtual FloatRect mapRect(const FloatRect&, bool forward = true) OVERRIDE FINAL;
54 virtual TextStream& externalRepresentation(TextStream&, int indention) const OVERRIDE;
55 virtual PassRefPtr<SkImageFilter> createImageFilter(SkiaImageFilterBuilder*) OVERRIDE;
58 FEDropShadow(Filter*, float, float, float, float, const Color&, float);
60 virtual void applySoftware() OVERRIDE;
67 float m_shadowOpacity;
72 #endif // FEDropShadow_h