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

Side by Side Diff: src/pathops/SkOpSegment.h

Issue 1405383004: fix path op conic bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix w cast Created 5 years, 1 month 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 | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.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 SkOpSegment_DEFINE 7 #ifndef SkOpSegment_DEFINE
8 #define SkOpSegment_DEFINE 8 #define SkOpSegment_DEFINE
9 9
10 #include "SkOpAngle.h" 10 #include "SkOpAngle.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 63
64 SkOpSegment* addCubic(SkPoint pts[4], SkOpContour* parent) { 64 SkOpSegment* addCubic(SkPoint pts[4], SkOpContour* parent) {
65 init(pts, 1, parent, SkPath::kCubic_Verb); 65 init(pts, 1, parent, SkPath::kCubic_Verb);
66 SkDCurve curve; 66 SkDCurve curve;
67 curve.fCubic.set(pts); 67 curve.fCubic.set(pts);
68 curve.setCubicBounds(pts, 1, 0, 1, &fBounds); 68 curve.setCubicBounds(pts, 1, 0, 1, &fBounds);
69 return this; 69 return this;
70 } 70 }
71 71
72 void addCurveTo(const SkOpSpanBase* start, const SkOpSpanBase* end, SkPathWr iter* path, 72 bool addCurveTo(const SkOpSpanBase* start, const SkOpSpanBase* end, SkPathWr iter* path) const;
73 bool active) const;
74 73
75 SkOpAngle* addEndSpan(SkChunkAlloc* allocator) { 74 SkOpAngle* addEndSpan(SkChunkAlloc* allocator) {
76 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(allocator); 75 SkOpAngle* angle = SkOpTAllocator<SkOpAngle>::Allocate(allocator);
77 angle->set(&fTail, fTail.prev()); 76 angle->set(&fTail, fTail.prev());
78 fTail.setFromAngle(angle); 77 fTail.setFromAngle(angle);
79 return angle; 78 return angle;
80 } 79 }
81 80
82 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) { 81 SkOpSegment* addLine(SkPoint pts[2], SkOpContour* parent) {
83 init(pts, 1, parent, SkPath::kLine_Verb); 82 init(pts, 1, parent, SkPath::kLine_Verb);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 SkPathOpsBounds fBounds; // tight bounds 416 SkPathOpsBounds fBounds; // tight bounds
418 SkScalar fWeight; 417 SkScalar fWeight;
419 int fCount; // number of spans (one for a non-intersecting segment) 418 int fCount; // number of spans (one for a non-intersecting segment)
420 int fDoneCount; // number of processed spans (zero initially) 419 int fDoneCount; // number of processed spans (zero initially)
421 SkPath::Verb fVerb; 420 SkPath::Verb fVerb;
422 bool fVisited; // used by missing coincidence check 421 bool fVisited; // used by missing coincidence check
423 SkDEBUGCODE(int fID); 422 SkDEBUGCODE(int fID);
424 }; 423 };
425 424
426 #endif 425 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpSegment.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698