summaryrefslogtreecommitdiffstats
path: root/skia/include/SkCornerPathEffect.h
diff options
context:
space:
mode:
Diffstat (limited to 'skia/include/SkCornerPathEffect.h')
-rw-r--r--skia/include/SkCornerPathEffect.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/skia/include/SkCornerPathEffect.h b/skia/include/SkCornerPathEffect.h
new file mode 100644
index 0000000..c62718b
--- /dev/null
+++ b/skia/include/SkCornerPathEffect.h
@@ -0,0 +1,62 @@
+/* include/graphics/SkCornerPathEffect.h
+**
+** Copyright 2006, Google Inc.
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+** http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+
+#ifndef SkCornerPathEffect_DEFINED
+#define SkCornerPathEffect_DEFINED
+
+#include "SkPathEffect.h"
+
+/** \class SkCornerPathEffect
+
+ SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners
+ into various treatments (e.g. rounded corners)
+*/
+class SkCornerPathEffect : public SkPathEffect {
+public:
+ /** radius must be > 0 to have an effect. It specifies the distance from each corner
+ that should be "rounded".
+ */
+ SkCornerPathEffect(SkScalar radius);
+ virtual ~SkCornerPathEffect();
+
+ // overrides for SkPathEffect
+ // This method is not exported to java.
+ virtual bool filterPath(SkPath* dst, const SkPath& src, SkScalar* width);
+
+ // overrides for SkFlattenable
+ // This method is not exported to java.
+ virtual Factory getFactory();
+ // This method is not exported to java.
+ virtual void flatten(SkFlattenableWriteBuffer&);
+
+protected:
+ SkCornerPathEffect(SkFlattenableReadBuffer&);
+
+private:
+ SkScalar fRadius;
+
+ static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
+
+ // illegal
+ SkCornerPathEffect(const SkCornerPathEffect&);
+ SkCornerPathEffect& operator=(const SkCornerPathEffect&);
+
+ typedef SkPathEffect INHERITED;
+};
+
+#endif
+