reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 1 | /* |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 2 | * Copyright 2006 The Android Open Source Project |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 3 | * |
epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef SkBlurMaskFilter_DEFINED |
| 9 | #define SkBlurMaskFilter_DEFINED |
| 10 | |
| 11 | // we include this since our callers will need to at least be able to ref/unref |
| 12 | #include "SkMaskFilter.h" |
Mike Reed | 80747ef | 2018-01-23 15:29:32 -0500 | [diff] [blame] | 13 | #include "SkRect.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 14 | #include "SkScalar.h" |
commit-bot@chromium.org | e396455 | 2014-04-28 16:25:35 +0000 | [diff] [blame] | 15 | #include "SkBlurTypes.h" |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 16 | |
Mike Reed | 80747ef | 2018-01-23 15:29:32 -0500 | [diff] [blame] | 17 | class SkRRect; |
| 18 | |
bsalomon@google.com | 8c3ff17 | 2011-04-15 15:42:24 +0000 | [diff] [blame] | 19 | class SK_API SkBlurMaskFilter { |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 20 | public: |
Brian Osman | 3e31e99 | 2017-11-14 16:16:39 +0000 | [diff] [blame] | 21 | #ifdef SK_SUPPORT_LEGACY_EMBOSSMASKFILTER |
| 22 | /** Create an emboss maskfilter |
| 23 | @param blurSigma standard deviation of the Gaussian blur to apply |
| 24 | before applying lighting (e.g. 3) |
| 25 | @param direction array of 3 scalars [x, y, z] specifying the direction of the light source |
| 26 | @param ambient 0...1 amount of ambient light |
| 27 | @param specular coefficient for specular highlights (e.g. 8) |
| 28 | @return the emboss maskfilter |
| 29 | */ |
| 30 | static sk_sp<SkMaskFilter> MakeEmboss(SkScalar blurSigma, const SkScalar direction[3], |
| 31 | SkScalar ambient, SkScalar specular); |
| 32 | #endif |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | #endif |