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

Unified Diff: src/pathops/SkPathWriter.h

Issue 13094010: Add implementation of 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/SkPathOpsSpan.h ('k') | src/pathops/SkPathWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathWriter.h
===================================================================
--- src/pathops/SkPathWriter.h (revision 0)
+++ src/pathops/SkPathWriter.h (revision 0)
@@ -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__) */
« no previous file with comments | « src/pathops/SkPathOpsSpan.h ('k') | src/pathops/SkPathWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698