Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: include/effects/SkArcToPathEffect.h

Issue 813513003: add arcto patheffect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gyp/effects.gypi ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
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 SkArcToPathEffect_DEFINED
9 #define SkArcToPathEffect_DEFINED
10
11 #include "SkPathEffect.h"
12
13 class SK_API SkArcToPathEffect : public SkPathEffect {
14 public:
15 /** radius must be > 0 to have an effect. It specifies the distance from eac h corner
16 that should be "rounded".
17 */
18 static SkPathEffect* Create(SkScalar radius) {
19 if (radius <= 0) {
20 return NULL;
21 }
22 return SkNEW_ARGS(SkArcToPathEffect, (radius));
23 }
24
25 bool filterPath(SkPath* dst, const SkPath& src, SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
26
27 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArcToPathEffect)
28
29 protected:
30 explicit SkArcToPathEffect(SkScalar radius);
31 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
32
33 private:
34 SkScalar fRadius;
35
36 typedef SkPathEffect INHERITED;
37 };
38
39 #endif
OLDNEW
« no previous file with comments | « gyp/effects.gypi ('k') | samplecode/SamplePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698