Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkAlphaThresholdFilter.h
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 SkAlphaThresholdFilter_DEFINED
9 #define SkAlphaThresholdFilter_DEFINED
10 
11 #include "SkImageFilter.h"
12 
13 class SkRegion;
14 
15 class SK_API SkAlphaThresholdFilter {
16 public:
24  static sk_sp<SkImageFilter> Make(const SkRegion& region, SkScalar innerMin,
25  SkScalar outerMax, sk_sp<SkImageFilter> input,
26  const SkImageFilter::CropRect* cropRect = nullptr);
27 
28 
29 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
30  static SkImageFilter* Create(const SkRegion& region, SkScalar innerMin,
31  SkScalar outerMax, SkImageFilter* input = nullptr) {
32  return Make(region, innerMin, outerMax, sk_ref_sp<SkImageFilter>(input)).release();
33  }
34 #endif
35 
36  SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
37 };
38 
39 #endif
T *SK_WARN_UNUSED_RESULT release()
Return the bare pointer, and set the internal object pointer to nullptr.
Definition: SkRefCnt.h:363
Definition: SkImageFilter.h:55
Base class for image filters.
Definition: SkImageFilter.h:35
The SkRegion class encapsulates the geometric region used to specify clipping areas for drawing...
Definition: SkRegion.h:30
Definition: SkAlphaThresholdFilter.h:15