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

Unified Diff: src/core/SkGeometry.h

Issue 455043002: use conics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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: src/core/SkGeometry.h
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
index c8a69a97e371c037ee754e35572c72d2897097d3..c854b5e1c3711fc6a31fbec84cfb8a5b285057e3 100644
--- a/src/core/SkGeometry.h
+++ b/src/core/SkGeometry.h
@@ -228,6 +228,18 @@ int SkBuildQuadArc(const SkVector& unitStart, const SkVector& unitStop,
// experimental
struct SkConic {
+ SkConic() {}
+ SkConic(const SkPoint& p0, const SkPoint& p1, const SkPoint& p2, SkScalar w) {
+ fPts[0] = p0;
+ fPts[1] = p1;
+ fPts[2] = p2;
+ fW = w;
+ }
+ SkConic(const SkPoint pts[3], SkScalar w) {
+ memcpy(fPts, pts, 3 * sizeof(SkPoint));
caryclark 2014/12/17 15:52:43 use sizeof(fPts) instead?
reed1 2014/12/17 16:12:38 Done.
+ fW = w;
+ }
+
SkPoint fPts[3];
SkScalar fW;
@@ -278,6 +290,8 @@ struct SkConic {
* @return true if max curvature found inside 0..1 range, false otherwise
*/
bool findMaxCurvature(SkScalar* t) const;
+
+ static SkScalar TransformW(const SkPoint[3], SkScalar w, const SkMatrix&);
};
#include "SkTemplates.h"
« no previous file with comments | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkGeometry.cpp » ('j') | src/core/SkGeometry.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698