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

Unified Diff: experimental/Intersection/QuadraticLineSegments.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/QuadraticLineSegments.cpp
diff --git a/experimental/Intersection/QuadraticLineSegments.cpp b/experimental/Intersection/QuadraticLineSegments.cpp
deleted file mode 100644
index 5e26d35f87b923eff269e2c4031da3a68e0dd8c1..0000000000000000000000000000000000000000
--- a/experimental/Intersection/QuadraticLineSegments.cpp
+++ /dev/null
@@ -1,34 +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 "QuadraticLineSegments.h"
-
-// http://cagd.cs.byu.edu/~557/text/cagd.pdf 2.7
-// A hodograph is the first derivative curve
-void hodograph(const Quadratic& quad, _Line& hodo) {
- hodo[0].x = 2 * (quad[1].x - quad[0].x);
- hodo[0].y = 2 * (quad[1].y - quad[0].y);
- hodo[1].x = 2 * (quad[2].x - quad[1].x);
- hodo[1].y = 2 * (quad[2].y - quad[1].y);
-}
-
-// A 2nd hodograph is the second derivative curve
-void secondHodograph(const Quadratic& quad, _Point& hodo2) {
- _Line hodo;
- hodograph(quad, hodo);
- hodo2.x = hodo[1].x - hodo[0].x;
- hodo2.y = hodo[1].y - hodo[0].y;
-}
-
-// The number of line segments required to approximate the quad
-// see http://cagd.cs.byu.edu/~557/text/cagd.pdf 10.6
-double subDivisions(const Quadratic& quad) {
- _Point hodo2;
- secondHodograph(quad, hodo2);
- double dist = sqrt(hodo2.x * hodo2.x + hodo2.y * hodo2.y);
- double segments = sqrt(dist / (8 * FLT_EPSILON));
- return segments;
-}
« no previous file with comments | « experimental/Intersection/QuadraticLineSegments.h ('k') | experimental/Intersection/QuadraticParameterization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698