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

Unified Diff: src/core/SkGeometry.h

Issue 455043002: use conics (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address comments 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
« no previous file with comments | « src/core/SkEdgeBuilder.cpp ('k') | src/core/SkGeometry.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGeometry.h
diff --git a/src/core/SkGeometry.h b/src/core/SkGeometry.h
index c8a69a97e371c037ee754e35572c72d2897097d3..b14a2ddb986ad8c62b5bbb80cd25d3dbec5a54bb 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, sizeof(fPts));
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698