Skia
2DGraphicsLibrary
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SkBlurImageFilter.h
1 /*
2  * Copyright 2011 The Android Open Source Project
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 SkBlurImageFilter_DEFINED
9 #define SkBlurImageFilter_DEFINED
10 
11 #include "SkImageFilter.h"
12 
13 class SK_API SkBlurImageFilter {
14 public:
15  static sk_sp<SkImageFilter> Make(SkScalar sigmaX, SkScalar sigmaY,
17  const SkImageFilter::CropRect* cropRect = nullptr) {
18  return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect);
19  }
20 
21 #ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
22  static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY,
23  SkImageFilter * input = nullptr,
24  const SkImageFilter::CropRect* cropRect = nullptr) {
25  return SkImageFilter::MakeBlur(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input),
26  cropRect).release();
27  }
28 #endif
29 };
30 
31 #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
Definition: SkBlurImageFilter.h:13