blob: cd77b106a45a93e182745a6cd5d6fdcb66d12a8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkAmbientShadowMaskFilter_DEFINED
#define SkAmbientShadowMaskFilter_DEFINED
#include "SkMaskFilter.h"
#include "SkShadowFlags.h"
/*
* This filter implements a shadow representing ambient occlusion for an occluding object.
*/
class SK_API SkAmbientShadowMaskFilter {
public:
/** Create a shadow maskfilter.
* @param occluderHeight Height of occluding object off of ground plane.
* @param ambientAlpha Base opacity of the ambient occlusion shadow.
* @param flags Flags to use - defaults to none
* @return The new shadow maskfilter
*/
static sk_sp<SkMaskFilter> Make(SkScalar occluderHeight, SkScalar ambientAlpha,
uint32_t flags = SkShadowFlags::kNone_ShadowFlag);
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
private:
SkAmbientShadowMaskFilter(); // can't be instantiated
};
#endif
|