Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
michael@0 | 1 | /* |
michael@0 | 2 | * Copyright 2006 The Android Open Source Project |
michael@0 | 3 | * |
michael@0 | 4 | * Use of this source code is governed by a BSD-style license that can be |
michael@0 | 5 | * found in the LICENSE file. |
michael@0 | 6 | */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef SkCornerPathEffect_DEFINED |
michael@0 | 9 | #define SkCornerPathEffect_DEFINED |
michael@0 | 10 | |
michael@0 | 11 | #include "SkPathEffect.h" |
michael@0 | 12 | |
michael@0 | 13 | /** \class SkCornerPathEffect |
michael@0 | 14 | |
michael@0 | 15 | SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners |
michael@0 | 16 | into various treatments (e.g. rounded corners) |
michael@0 | 17 | */ |
michael@0 | 18 | class SK_API SkCornerPathEffect : public SkPathEffect { |
michael@0 | 19 | public: |
michael@0 | 20 | /** radius must be > 0 to have an effect. It specifies the distance from each corner |
michael@0 | 21 | that should be "rounded". |
michael@0 | 22 | */ |
michael@0 | 23 | static SkCornerPathEffect* Create(SkScalar radius) { |
michael@0 | 24 | return SkNEW_ARGS(SkCornerPathEffect, (radius)); |
michael@0 | 25 | } |
michael@0 | 26 | virtual ~SkCornerPathEffect(); |
michael@0 | 27 | |
michael@0 | 28 | virtual bool filterPath(SkPath* dst, const SkPath& src, |
michael@0 | 29 | SkStrokeRec*, const SkRect*) const SK_OVERRIDE; |
michael@0 | 30 | |
michael@0 | 31 | SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect) |
michael@0 | 32 | |
michael@0 | 33 | protected: |
michael@0 | 34 | SkCornerPathEffect(SkReadBuffer&); |
michael@0 | 35 | virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
michael@0 | 36 | |
michael@0 | 37 | #ifdef SK_SUPPORT_LEGACY_PUBLICEFFECTCONSTRUCTORS |
michael@0 | 38 | public: |
michael@0 | 39 | #endif |
michael@0 | 40 | SkCornerPathEffect(SkScalar radius); |
michael@0 | 41 | |
michael@0 | 42 | private: |
michael@0 | 43 | SkScalar fRadius; |
michael@0 | 44 | |
michael@0 | 45 | typedef SkPathEffect INHERITED; |
michael@0 | 46 | }; |
michael@0 | 47 | |
michael@0 | 48 | #endif |