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

Side by Side Diff: include/pathops/SkPathOps.h

Issue 348343002: add pathops tight bounds; conform path ops' gyp to unit tests (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months 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/pathops_unittest.gypi ('k') | src/pathops/SkPathOpsTightBounds.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #ifndef SkPathOps_DEFINED 7 #ifndef SkPathOps_DEFINED
8 #define SkPathOps_DEFINED 8 #define SkPathOps_DEFINED
9 9
10 #include "SkPreConfig.h" 10 #include "SkPreConfig.h"
11 11
12 class SkPath; 12 class SkPath;
13 struct SkRect;
13 14
14 // FIXME: move everything below into the SkPath class 15 // FIXME: move everything below into the SkPath class
15 /** 16 /**
16 * The logical operations that can be performed when combining two paths. 17 * The logical operations that can be performed when combining two paths.
17 */ 18 */
18 enum SkPathOp { 19 enum SkPathOp {
19 kDifference_PathOp, //!< subtract the op path from the first path 20 kDifference_PathOp, //!< subtract the op path from the first path
20 kIntersect_PathOp, //!< intersect the two paths 21 kIntersect_PathOp, //!< intersect the two paths
21 kUnion_PathOp, //!< union (inclusive-or) the two paths 22 kUnion_PathOp, //!< union (inclusive-or) the two paths
22 kXOR_PathOp, //!< exclusive-or the two paths 23 kXOR_PathOp, //!< exclusive-or the two paths
(...skipping 24 matching lines...) Expand all
47 48
48 Returns true if operation was able to produce a result; 49 Returns true if operation was able to produce a result;
49 otherwise, result is unmodified. 50 otherwise, result is unmodified.
50 51
51 @param path The path to simplify. 52 @param path The path to simplify.
52 @param result The simplified path. The result may be the input. 53 @param result The simplified path. The result may be the input.
53 @return True if simplification succeeded. 54 @return True if simplification succeeded.
54 */ 55 */
55 bool SK_API Simplify(const SkPath& path, SkPath* result); 56 bool SK_API Simplify(const SkPath& path, SkPath* result);
56 57
58 /** Set the resulting rectangle to the tight bounds of the path.
59
60 @param path The path measured.
61 @param result The tight bounds of the path.
62 @return True if the bounds could be computed.
63 */
64 bool SK_API TightBounds(const SkPath& path, SkRect* result);
65
57 #endif 66 #endif
OLDNEW
« no previous file with comments | « gyp/pathops_unittest.gypi ('k') | src/pathops/SkPathOpsTightBounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698