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#ifndef SkDropShadowImageFilter_DEFINED
9#define SkDropShadowImageFilter_DEFINED
10
11#include "include/core/SkColor.h"
12#include "include/core/SkImageFilter.h"
13#include "include/core/SkScalar.h"
14
15// DEPRECATED: Use include/effects/SkImageFilters::DropShadow and DropShadowOnly
16class SK_API SkDropShadowImageFilter {
17public:
18 enum ShadowMode {
19 kDrawShadowAndForeground_ShadowMode,
20 kDrawShadowOnly_ShadowMode,
21
22 kLast_ShadowMode = kDrawShadowOnly_ShadowMode
23 };
24
25 static const int kShadowModeCount = kLast_ShadowMode+1;
26
27 static sk_sp<SkImageFilter> Make(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY,
28 SkColor color, ShadowMode shadowMode,
29 sk_sp<SkImageFilter> input,
30 const SkImageFilter::CropRect* cropRect = nullptr);
31
32 static void RegisterFlattenables();
33
34private:
35 SkDropShadowImageFilter() = delete;
36};
37
38#endif
39