aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/Intersection
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/Intersection')
-rw-r--r--experimental/Intersection/SkAntiEdge.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/experimental/Intersection/SkAntiEdge.cpp b/experimental/Intersection/SkAntiEdge.cpp
index 0aa159c53e..2cce960e52 100644
--- a/experimental/Intersection/SkAntiEdge.cpp
+++ b/experimental/Intersection/SkAntiEdge.cpp
@@ -7,6 +7,14 @@
#include "SkAntiEdge.h"
#include "SkPoint.h"
+/** Returns the signed fraction of a SkFixed
+ */
+static inline SkFixed SkFixedFraction(SkFixed x)
+{
+ SkFixed mask = x >> 31 << 16;
+ return (x & 0xFFFF) | mask;
+}
+
void SkAntiEdge::pointOnLine(SkFixed x, SkFixed y) {
float x0 = SkFixedToFloat(x);
float y0 = SkFixedToFloat(y);