SkDropShadowImageFilter.h revision 5b39f5ba9c339d1e4dae391fee9ec1396feec180
1/*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#include "SkColor.h"
9#include "SkImageFilter.h"
10#include "SkScalar.h"
11
12class SK_API SkDropShadowImageFilter : public SkImageFilter {
13public:
14    SkDropShadowImageFilter(SkScalar dx, SkScalar dy, SkScalar sigma, SkColor, SkImageFilter* input = NULL);
15    SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter)
16
17protected:
18    explicit SkDropShadowImageFilter(SkFlattenableReadBuffer&);
19    virtual void flatten(SkFlattenableWriteBuffer&) const SK_OVERRIDE;
20    virtual bool onFilterImage(Proxy*, const SkBitmap& source, const SkMatrix&, SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
21
22private:
23    SkScalar fDx, fDy, fSigma;
24    SkColor fColor;
25    typedef SkImageFilter INHERITED;
26};
27