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

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

Issue 1034073004: add legacy pathop enums; fix uninitialized warning (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: temporarily define legacy pathops all the time Created 5 years, 8 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/pathops/SkPathOpsTSect.h » ('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
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
17 // FIXME: move everything below into the SkPath class 23 // FIXME: move everything below into the SkPath class
18 /** 24 /**
19 * The logical operations that can be performed when combining two paths. 25 * The logical operations that can be performed when combining two paths.
20 */ 26 */
21 enum SkPathOp { 27 enum SkPathOp {
22 kDifference_SkPathOp, //!< subtract the op path from the first path 28 kDifference_SkPathOp, //!< subtract the op path from the first path
23 kIntersect_SkPathOp, //!< intersect the two paths 29 kIntersect_SkPathOp, //!< intersect the two paths
24 kUnion_SkPathOp, //!< union (inclusive-or) the two paths 30 kUnion_SkPathOp, //!< union (inclusive-or) the two paths
25 kXOR_SkPathOp, //!< exclusive-or the two paths 31 kXOR_SkPathOp, //!< exclusive-or the two paths
26 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
27 }; 41 };
28 42
29 /** 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
30 specified path: this = (this op operand). 44 specified path: this = (this op operand).
31 The resulting path will be constructed from non-overlapping contours. 45 The resulting path will be constructed from non-overlapping contours.
32 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
33 into quadratics, and quadratics maybe turned into lines. 47 into quadratics, and quadratics maybe turned into lines.
34 48
35 Returns true if operation was able to produce a result; 49 Returns true if operation was able to produce a result;
36 otherwise, result is unmodified. 50 otherwise, result is unmodified.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool resolve(SkPath* result); 101 bool resolve(SkPath* result);
88 102
89 private: 103 private:
90 SkTArray<SkPath> fPathRefs; 104 SkTArray<SkPath> fPathRefs;
91 SkTDArray<SkPathOp> fOps; 105 SkTDArray<SkPathOp> fOps;
92 106
93 void reset(); 107 void reset();
94 }; 108 };
95 109
96 #endif 110 #endif
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkPathOpsTSect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698