OLD | NEW |
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 SkReduceOrder_DEFINED | 7 #ifndef SkReduceOrder_DEFINED |
8 #define SkReduceOrder_DEFINED | 8 #define SkReduceOrder_DEFINED |
9 | 9 |
10 #include "SkPathOpsCubic.h" | 10 #include "SkPathOpsCubic.h" |
11 #include "SkPathOpsLine.h" | 11 #include "SkPathOpsLine.h" |
12 #include "SkPathOpsQuad.h" | 12 #include "SkPathOpsQuad.h" |
13 | 13 |
14 union SkReduceOrder { | 14 union SkReduceOrder { |
15 enum Quadratics { | 15 enum Quadratics { |
16 kNo_Quadratics, | 16 kNo_Quadratics, |
17 kAllow_Quadratics | 17 kAllow_Quadratics |
18 }; | 18 }; |
19 | 19 |
20 int reduce(const SkDCubic& cubic, Quadratics); | 20 int reduce(const SkDCubic& cubic, Quadratics); |
21 int reduce(const SkDLine& line); | 21 int reduce(const SkDLine& line); |
22 int reduce(const SkDQuad& quad); | 22 int reduce(const SkDQuad& quad); |
23 | 23 |
| 24 static SkPath::Verb Conic(const SkPoint pts[3], SkScalar weight, SkPoint* re
ducePts); |
24 static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts); | 25 static SkPath::Verb Cubic(const SkPoint pts[4], SkPoint* reducePts); |
25 static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts); | 26 static SkPath::Verb Quad(const SkPoint pts[3], SkPoint* reducePts); |
26 | 27 |
27 SkDLine fLine; | 28 SkDLine fLine; |
28 SkDQuad fQuad; | 29 SkDQuad fQuad; |
29 SkDCubic fCubic; | 30 SkDCubic fCubic; |
30 }; | 31 }; |
31 | 32 |
32 #endif | 33 #endif |
OLD | NEW |