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

Unified Diff: src/pathops/SkDQuadImplicit.h

Issue 12880016: Add intersections for path ops (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « src/pathops/SkDLineIntersection.cpp ('k') | src/pathops/SkDQuadImplicit.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDQuadImplicit.h
===================================================================
--- src/pathops/SkDQuadImplicit.h (revision 0)
+++ src/pathops/SkDQuadImplicit.h (revision 0)
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2012 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef SkDQuadImplicit_DEFINED
+#define SkDQuadImplicit_DEFINED
+
+#include "SkPathOpsQuad.h"
+
+class SkDQuadImplicit {
+public:
+ explicit SkDQuadImplicit(const SkDQuad& q);
+
+ bool match(const SkDQuadImplicit& two) const;
+ static bool Match(const SkDQuad& quad1, const SkDQuad& quad2);
+
+ double x2() const { return fP[kXx_Coeff]; }
+ double xy() const { return fP[kXy_Coeff]; }
+ double y2() const { return fP[kYy_Coeff]; }
+ double x() const { return fP[kX_Coeff]; }
+ double y() const { return fP[kY_Coeff]; }
+ double c() const { return fP[kC_Coeff]; }
+
+private:
+ enum Coeffs {
+ kXx_Coeff,
+ kXy_Coeff,
+ kYy_Coeff,
+ kX_Coeff,
+ kY_Coeff,
+ kC_Coeff,
+ };
+
+ double fP[kC_Coeff + 1];
+};
+
+#endif
« no previous file with comments | « src/pathops/SkDLineIntersection.cpp ('k') | src/pathops/SkDQuadImplicit.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698