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

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

Issue 131103009: update pathops to circle sort (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable old test that still fails on linux 32 release Created 6 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 | « src/pathops/SkPathOpsCubic.cpp ('k') | src/pathops/SkPathOpsDebug.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 SkPathOpsCurve_DEFINE 7 #ifndef SkPathOpsCurve_DEFINE
8 #define SkPathOpsCurve_DEFINE 8 #define SkPathOpsCurve_DEFINE
9 9
10 #include "SkIntersections.h"
10 #include "SkPathOpsCubic.h" 11 #include "SkPathOpsCubic.h"
11 #include "SkPathOpsLine.h" 12 #include "SkPathOpsLine.h"
12 #include "SkPathOpsQuad.h" 13 #include "SkPathOpsQuad.h"
13 14
14 static SkDPoint dline_xy_at_t(const SkPoint a[2], double t) { 15 static SkDPoint dline_xy_at_t(const SkPoint a[2], double t) {
15 SkDLine line; 16 SkDLine line;
16 line.set(a); 17 line.set(a);
17 return line.ptAtT(t); 18 return line.ptAtT(t);
18 } 19 }
19 20
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 && AlmostEqualUlps(dst[2].fX, dst[3].fX); 143 && AlmostEqualUlps(dst[2].fX, dst[3].fX);
143 } 144 }
144 145
145 static bool (* const CurveIsVertical[])(const SkPoint[], double , double) = { 146 static bool (* const CurveIsVertical[])(const SkPoint[], double , double) = {
146 NULL, 147 NULL,
147 line_is_vertical, 148 line_is_vertical,
148 quad_is_vertical, 149 quad_is_vertical,
149 cubic_is_vertical 150 cubic_is_vertical
150 }; 151 };
151 152
153 static void line_intersect_ray(const SkPoint a[2], const SkDLine& ray, SkInterse ctions* i) {
154 SkDLine line;
155 line.set(a);
156 i->intersectRay(line, ray);
157 }
158
159 static void quad_intersect_ray(const SkPoint a[3], const SkDLine& ray, SkInterse ctions* i) {
160 SkDQuad quad;
161 quad.set(a);
162 i->intersectRay(quad, ray);
163 }
164
165 static void cubic_intersect_ray(const SkPoint a[4], const SkDLine& ray, SkInters ections* i) {
166 SkDCubic cubic;
167 cubic.set(a);
168 i->intersectRay(cubic, ray);
169 }
170
171 static void (* const CurveIntersectRay[])(const SkPoint[] , const SkDLine& , SkI ntersections* ) = {
172 NULL,
173 line_intersect_ray,
174 quad_intersect_ray,
175 cubic_intersect_ray
176 };
177
152 #endif 178 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCubic.cpp ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698