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: src/pathops/SkDConicLineIntersection.cpp

Issue 2338323002: quad and conic do not intersect (Closed)
Patch Set: turn off under development Created 4 years, 3 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/SkOpCoincidence.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 2015 Google Inc. 2 * Copyright 2015 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 #include "SkIntersections.h" 7 #include "SkIntersections.h"
8 #include "SkPathOpsConic.h" 8 #include "SkPathOpsConic.h"
9 #include "SkPathOpsCurve.h" 9 #include "SkPathOpsCurve.h"
10 #include "SkPathOpsLine.h" 10 #include "SkPathOpsLine.h"
11 11
12 class LineConicIntersections { 12 class LineConicIntersections {
13 public: 13 public:
14 enum PinTPoint { 14 enum PinTPoint {
15 kPointUninitialized, 15 kPointUninitialized,
16 kPointInitialized 16 kPointInitialized
17 }; 17 };
18 18
19 LineConicIntersections(const SkDConic& c, const SkDLine& l, SkIntersections* i) 19 LineConicIntersections(const SkDConic& c, const SkDLine& l, SkIntersections* i)
20 : fConic(c) 20 : fConic(c)
21 , fLine(&l) 21 , fLine(&l)
22 , fIntersections(i) 22 , fIntersections(i)
23 , fAllowNear(true) { 23 , fAllowNear(true) {
24 i->setMax(3); // allow short partial coincidence plus discrete intersec tion 24 i->setMax(4); // allow short partial coincidence plus discrete intersec tion
25 } 25 }
26 26
27 LineConicIntersections(const SkDConic& c) 27 LineConicIntersections(const SkDConic& c)
28 : fConic(c) 28 : fConic(c)
29 SkDEBUGPARAMS(fLine(nullptr)) 29 SkDEBUGPARAMS(fLine(nullptr))
30 SkDEBUGPARAMS(fIntersections(nullptr)) 30 SkDEBUGPARAMS(fIntersections(nullptr))
31 SkDEBUGPARAMS(fAllowNear(false)) { 31 SkDEBUGPARAMS(fAllowNear(false)) {
32 } 32 }
33 33
34 void allowNear(bool allow) { 34 void allowNear(bool allow) {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, doub le* roots) { 376 int SkIntersections::HorizontalIntercept(const SkDConic& conic, SkScalar y, doub le* roots) {
377 LineConicIntersections c(conic); 377 LineConicIntersections c(conic);
378 return c.horizontalIntersect(y, roots); 378 return c.horizontalIntersect(y, roots);
379 } 379 }
380 380
381 int SkIntersections::VerticalIntercept(const SkDConic& conic, SkScalar x, double * roots) { 381 int SkIntersections::VerticalIntercept(const SkDConic& conic, SkScalar x, double * roots) {
382 LineConicIntersections c(conic); 382 LineConicIntersections c(conic);
383 return c.verticalIntersect(x, roots); 383 return c.verticalIntersect(x, roots);
384 } 384 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkOpCoincidence.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698