Add base types for path ops

Paths contain lines, quads, and cubics, which are
collectively curves.

To work with path intersections, intermediary curves
are constructed. For now, those intermediates use
doubles to guarantee sufficient precision.

The DVector, DPoint, DLine, DQuad, and DCubic
structs encapsulate these intermediate curves.

The DRect and DTriangle structs are created to
describe intersectable areas of interest.

The Bounds struct inherits from SkRect to create
a SkScalar-based rectangle that intersects shared
edges.

This also includes common math equalities and
debugging that the remainder of path ops builds on,
as well as a temporary top-level interface in
include/pathops/SkPathOps.h.
Review URL: https://codereview.chromium.org/12827020

git-svn-id: http://skia.googlecode.com/svn/trunk@8551 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/pathops/SkPathWriter.h b/src/pathops/SkPathWriter.h
new file mode 100644
index 0000000..2989b35
--- /dev/null
+++ b/src/pathops/SkPathWriter.h
@@ -0,0 +1,44 @@
+/*
+ * 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 SkPathWriter_DEFINED
+#define SkPathWriter_DEFINED
+
+#include "SkPath.h"
+
+class SkPathWriter {
+public:
+    SkPathWriter(SkPath& path);
+    void close();
+    void cubicTo(const SkPoint& pt1, const SkPoint& pt2, const SkPoint& pt3);
+    void deferredLine(const SkPoint& pt);
+    void deferredMove(const SkPoint& pt);
+    void deferredMoveLine(const SkPoint& pt);
+    bool hasMove() const;
+    void init();
+    bool isClosed() const;
+    void lineTo();
+    const SkPath* nativePath() const;
+    void nudge();
+    void quadTo(const SkPoint& pt1, const SkPoint& pt2);
+    bool someAssemblyRequired() const;
+    
+private:
+    bool changedSlopes(const SkPoint& pt) const;
+    void moveTo();
+    
+    SkPath* fPathPtr;
+    SkPoint fDefer[2];
+    SkPoint fFirstPt;
+    int fCloses;
+    int fMoves;
+    bool fEmpty;
+    bool fHasMove;
+    bool fMoved;
+};
+
+
+#endif /* defined(__PathOps__SkPathWriter__) */