2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
9 #include "SkImageFilter.h"
12 class SK_API SkDropShadowImageFilter : public SkImageFilter {
14 static SkDropShadowImageFilter* Create(SkScalar dx, SkScalar dy,
15 SkScalar sigmaX, SkScalar sigmaY, SkColor color,
16 SkImageFilter* input = NULL,
17 const CropRect* cropRect = NULL) {
18 return SkNEW_ARGS(SkDropShadowImageFilter, (dx, dy, sigmaX, sigmaY,
19 color, input, cropRect));
21 virtual void computeFastBounds(const SkRect&, SkRect*) const SK_OVERRIDE;
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter)
25 SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor,
26 SkImageFilter* input, const CropRect* cropRect);
27 explicit SkDropShadowImageFilter(SkReadBuffer&);
28 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
29 virtual bool onFilterImage(Proxy*, const SkBitmap& source, const Context&, SkBitmap* result, SkIPoint* loc) const SK_OVERRIDE;
30 virtual bool onFilterBounds(const SkIRect& src, const SkMatrix&,
31 SkIRect* dst) const SK_OVERRIDE;
34 SkScalar fDx, fDy, fSigmaX, fSigmaY;
36 typedef SkImageFilter INHERITED;