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

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

Issue 1203983003: Revert of remove SK_SUPPORT_LEGACY_PATHOP_ENUMS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | src/pdf/SkPDFDevice.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 #include "SkTArray.h" 11 #include "SkTArray.h"
12 #include "SkTDArray.h" 12 #include "SkTDArray.h"
13 13
14 class SkPath; 14 class SkPath;
15 struct SkRect; 15 struct SkRect;
16 16
17 17
18 // FIXME: remove this once the define in src/skia/SkUserConfig.h lands
19 #ifndef SK_SUPPORT_LEGACY_PATHOP_ENUMS
20 #define SK_SUPPORT_LEGACY_PATHOP_ENUMS
21 #endif
22
18 // FIXME: move everything below into the SkPath class 23 // FIXME: move everything below into the SkPath class
19 /** 24 /**
20 * The logical operations that can be performed when combining two paths. 25 * The logical operations that can be performed when combining two paths.
21 */ 26 */
22 enum SkPathOp { 27 enum SkPathOp {
23 kDifference_SkPathOp, //!< subtract the op path from the first path 28 kDifference_SkPathOp, //!< subtract the op path from the first path
24 kIntersect_SkPathOp, //!< intersect the two paths 29 kIntersect_SkPathOp, //!< intersect the two paths
25 kUnion_SkPathOp, //!< union (inclusive-or) the two paths 30 kUnion_SkPathOp, //!< union (inclusive-or) the two paths
26 kXOR_SkPathOp, //!< exclusive-or the two paths 31 kXOR_SkPathOp, //!< exclusive-or the two paths
27 kReverseDifference_SkPathOp, //!< subtract the first path from the op path 32 kReverseDifference_SkPathOp, //!< subtract the first path from the op path
33
34 #ifdef SK_SUPPORT_LEGACY_PATHOP_ENUMS
35 kDifference_PathOp = 0, //!< subtract the op path from the first path
36 kIntersect_PathOp, //!< intersect the two paths
37 kUnion_PathOp, //!< union (inclusive-or) the two paths
38 kXOR_PathOp, //!< exclusive-or the two paths
39 kReverseDifference_PathOp, //!< subtract the first path from the op path
40 #endif
28 }; 41 };
29 42
30 /** Set this path to the result of applying the Op to this path and the 43 /** Set this path to the result of applying the Op to this path and the
31 specified path: this = (this op operand). 44 specified path: this = (this op operand).
32 The resulting path will be constructed from non-overlapping contours. 45 The resulting path will be constructed from non-overlapping contours.
33 The curve order is reduced where possible so that cubics may be turned 46 The curve order is reduced where possible so that cubics may be turned
34 into quadratics, and quadratics maybe turned into lines. 47 into quadratics, and quadratics maybe turned into lines.
35 48
36 Returns true if operation was able to produce a result; 49 Returns true if operation was able to produce a result;
37 otherwise, result is unmodified. 50 otherwise, result is unmodified.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 bool resolve(SkPath* result); 101 bool resolve(SkPath* result);
89 102
90 private: 103 private:
91 SkTArray<SkPath> fPathRefs; 104 SkTArray<SkPath> fPathRefs;
92 SkTDArray<SkPathOp> fOps; 105 SkTDArray<SkPathOp> fOps;
93 106
94 void reset(); 107 void reset();
95 }; 108 };
96 109
97 #endif 110 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698