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

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

Issue 12827020: Add base types for path ops (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/pathops/SkPathOpsBounds.h » ('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 2012 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 #ifndef SkPathOps_DEFINED
8 #define SkPathOps_DEFINED
9
10 class SkPath;
11
12 // FIXME: move this into SkPaths.h or just use the equivalent in SkRegion.h
13 enum SkPathOp {
14 kDifference_PathOp, //!< subtract the op path from the first path
15 kIntersect_PathOp, //!< intersect the two paths
16 kUnion_PathOp, //!< union (inclusive-or) the two paths
17 kXOR_PathOp, //!< exclusive-or the two paths
18 /** subtract the first path from the op path */
19 kReverseDifference_PathOp, // FIXME: unsupported
20 kReplace_PathOp //!< replace the dst path with the op FIXME: unsupport ed: should it be?
21 };
22
23 // FIXME: these functions become members of SkPath
24 /**
25 * Set this path to the result of applying the Op to this path and the
26 * specified path: this = (this op operand). The resulting path will be constr ucted
27 * from non-overlapping contours. The curve order is reduced where possible so that cubics may
28 * be turned into quadratics, and quadratics maybe turned into lines.
29 */
30 void Op(const SkPath& one, const SkPath& two, SkPathOp op, SkPath* result);
31
32 /**
33 * Set this path to a set of non-overlapping contours that describe the same
34 * area as the original path. The curve order is reduced where possible so tha t cubics may
35 * be turned into quadratics, and quadratics maybe turned into lines.
36 */
37 void Simplify(const SkPath& path, SkPath* result);
38
39 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkPathOpsBounds.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698