xref: /aosp_15_r20/external/skia/include/effects/SkCornerPathEffect.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1 /*
2  * Copyright 2006 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 SkCornerPathEffect_DEFINED
9 #define SkCornerPathEffect_DEFINED
10 
11 #include "include/core/SkRefCnt.h"
12 #include "include/core/SkScalar.h"
13 #include "include/core/SkTypes.h"
14 
15 class SkPathEffect;
16 
17 /** \class SkCornerPathEffect
18 
19     SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners
20     into various treatments (e.g. rounded corners)
21 */
22 class SK_API SkCornerPathEffect {
23 public:
24     /** radius must be > 0 to have an effect. It specifies the distance from each corner
25         that should be "rounded".
26     */
27     static sk_sp<SkPathEffect> Make(SkScalar radius);
28 
29     static void RegisterFlattenables();
30 };
31 
32 #endif
33