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

Unified Diff: experimental/Intersection/QuadraticBounds.cpp

Issue 867213004: remove prototype pathops code (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: experimental/Intersection/QuadraticBounds.cpp
diff --git a/experimental/Intersection/QuadraticBounds.cpp b/experimental/Intersection/QuadraticBounds.cpp
deleted file mode 100644
index 193743b04ac7f3f40644a8f985cc4f89e9aa9e3c..0000000000000000000000000000000000000000
--- a/experimental/Intersection/QuadraticBounds.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#include "CurveIntersection.h"
-#include "CurveUtilities.h"
-#include "Extrema.h"
-
-double leftMostT(const Quadratic& quad, double startT, double endT) {
- double leftT;
- if (findExtrema(quad[0].x, quad[1].x, quad[2].x, &leftT)
- && startT <= leftT && leftT <= endT) {
- return leftT;
- }
- _Point startPt;
- xy_at_t(quad, startT, startPt.x, startPt.y);
- _Point endPt;
- xy_at_t(quad, endT, endPt.x, endPt.y);
- return startPt.x <= endPt.x ? startT : endT;
-}
-
-void _Rect::setBounds(const Quadratic& quad) {
- set(quad[0]);
- add(quad[2]);
- double tValues[2];
- int roots = 0;
- if (!between(quad[0].x, quad[1].x, quad[2].x)) {
- roots = findExtrema(quad[0].x, quad[1].x, quad[2].x, tValues);
- }
- if (!between(quad[0].y, quad[1].y, quad[2].y)) {
- roots += findExtrema(quad[0].y, quad[1].y, quad[2].y, &tValues[roots]);
- }
- for (int x = 0; x < roots; ++x) {
- _Point result;
- xy_at_t(quad, tValues[x], result.x, result.y);
- add(result);
- }
-}
-
-void _Rect::setRawBounds(const Quadratic& quad) {
- set(quad[0]);
- for (int x = 1; x < 3; ++x) {
- add(quad[x]);
- }
-}
« no previous file with comments | « experimental/Intersection/QuadraticBezierClip_Test.cpp ('k') | experimental/Intersection/QuadraticImplicit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698