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

Side by Side Diff: src/pathops/SkDQuadLineIntersection.cpp

Issue 1654883003: add helper to create fancy underlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: correct comment to multiply by two Created 4 years, 10 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/core/SkTextToPathIter.h ('k') | src/pathops/SkPathOpsQuad.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 #include "SkIntersections.h" 7 #include "SkIntersections.h"
8 #include "SkPathOpsLine.h" 8 #include "SkPathOpsLine.h"
9 #include "SkPathOpsQuad.h" 9 #include "SkPathOpsQuad.h"
10 10
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 int SkIntersections::HorizontalIntercept(const SkDQuad& quad, SkScalar y, double * roots) { 436 int SkIntersections::HorizontalIntercept(const SkDQuad& quad, SkScalar y, double * roots) {
437 LineQuadraticIntersections q(quad); 437 LineQuadraticIntersections q(quad);
438 return q.horizontalIntersect(y, roots); 438 return q.horizontalIntersect(y, roots);
439 } 439 }
440 440
441 int SkIntersections::VerticalIntercept(const SkDQuad& quad, SkScalar x, double* roots) { 441 int SkIntersections::VerticalIntercept(const SkDQuad& quad, SkScalar x, double* roots) {
442 LineQuadraticIntersections q(quad); 442 LineQuadraticIntersections q(quad);
443 return q.verticalIntersect(x, roots); 443 return q.verticalIntersect(x, roots);
444 } 444 }
445
446 // SkDQuad accessors to Intersection utilities
447
448 int SkDQuad::horizontalIntersect(double yIntercept, double roots[2]) const {
449 return SkIntersections::HorizontalIntercept(*this, yIntercept, roots);
450 }
451
452 int SkDQuad::verticalIntersect(double xIntercept, double roots[2]) const {
453 return SkIntersections::VerticalIntercept(*this, xIntercept, roots);
454 }
OLDNEW
« no previous file with comments | « src/core/SkTextToPathIter.h ('k') | src/pathops/SkPathOpsQuad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698