blob: 86e7d12e973fcf10c4f0cb6d574715c19de242ce [file] [log] [blame]
reed@android.com8a1c16f2008-12-17 15:59:43 +00001/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00002 * Copyright 2006 The Android Open Source Project
reed@android.com8a1c16f2008-12-17 15:59:43 +00003 *
epoger@google.comec3ed6a2011-07-28 14:26:00 +00004 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
reed@android.com8a1c16f2008-12-17 15:59:43 +00006 */
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 Reed80747ef2018-01-23 15:29:32 -050013#include "SkRect.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000014#include "SkScalar.h"
commit-bot@chromium.orge3964552014-04-28 16:25:35 +000015#include "SkBlurTypes.h"
reed@android.com8a1c16f2008-12-17 15:59:43 +000016
Mike Reed80747ef2018-01-23 15:29:32 -050017class SkRRect;
18
bsalomon@google.com8c3ff172011-04-15 15:42:24 +000019class SK_API SkBlurMaskFilter {
reed@android.com8a1c16f2008-12-17 15:59:43 +000020public:
Brian Osman3e31e992017-11-14 16:16:39 +000021#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.com8a1c16f2008-12-17 15:59:43 +000033};
34
35#endif