blob: 8c5847628b3c1fbeb9ee1af5c8fe958351c66299 [file] [log] [blame]
epoger@google.comec3ed6a2011-07-28 14:26:00 +00001
reed@android.com8a1c16f2008-12-17 15:59:43 +00002/*
epoger@google.comec3ed6a2011-07-28 14:26:00 +00003 * Copyright 2006 The Android Open Source Project
reed@android.com8a1c16f2008-12-17 15:59:43 +00004 *
epoger@google.comec3ed6a2011-07-28 14:26:00 +00005 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
reed@android.com8a1c16f2008-12-17 15:59:43 +00007 */
8
epoger@google.comec3ed6a2011-07-28 14:26:00 +00009
reed@android.com8a1c16f2008-12-17 15:59:43 +000010#ifndef SkCornerPathEffect_DEFINED
11#define SkCornerPathEffect_DEFINED
12
13#include "SkPathEffect.h"
14
15/** \class SkCornerPathEffect
16
17 SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners
18 into various treatments (e.g. rounded corners)
19*/
ctguil@chromium.org7ffb1b22011-03-15 21:27:08 +000020class SK_API SkCornerPathEffect : public SkPathEffect {
reed@android.com8a1c16f2008-12-17 15:59:43 +000021public:
22 /** radius must be > 0 to have an effect. It specifies the distance from each corner
23 that should be "rounded".
24 */
25 SkCornerPathEffect(SkScalar radius);
26 virtual ~SkCornerPathEffect();
27
28 // overrides for SkPathEffect
29 // This method is not exported to java.
30 virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
31
32 // overrides for SkFlattenable
33 // This method is not exported to java.
reed@android.com8a1c16f2008-12-17 15:59:43 +000034 virtual void flatten(SkFlattenableWriteBuffer&);
djsollen@google.comba28d032012-03-26 17:57:35 +000035 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect)
reed@google.com6bac9472011-06-21 19:24:00 +000036
reed@android.com8a1c16f2008-12-17 15:59:43 +000037protected:
38 SkCornerPathEffect(SkFlattenableReadBuffer&);
39
40private:
41 SkScalar fRadius;
reed@android.com8a1c16f2008-12-17 15:59:43 +000042
43 typedef SkPathEffect INHERITED;
44};
45
46#endif
47