gfx/skia/trunk/src/pathops/SkPathWriter.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /*
michael@0 2 * Copyright 2012 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7 #ifndef SkPathWriter_DEFINED
michael@0 8 #define SkPathWriter_DEFINED
michael@0 9
michael@0 10 #include "SkPath.h"
michael@0 11
michael@0 12 class SkPathWriter {
michael@0 13 public:
michael@0 14 SkPathWriter(SkPath& path);
michael@0 15 void close();
michael@0 16 void cubicTo(const SkPoint& pt1, const SkPoint& pt2, const SkPoint& pt3);
michael@0 17 void deferredLine(const SkPoint& pt);
michael@0 18 void deferredMove(const SkPoint& pt);
michael@0 19 void deferredMoveLine(const SkPoint& pt);
michael@0 20 bool hasMove() const;
michael@0 21 void init();
michael@0 22 bool isClosed() const;
michael@0 23 bool isEmpty() const { return fEmpty; }
michael@0 24 void lineTo();
michael@0 25 const SkPath* nativePath() const;
michael@0 26 void nudge();
michael@0 27 void quadTo(const SkPoint& pt1, const SkPoint& pt2);
michael@0 28 bool someAssemblyRequired() const;
michael@0 29
michael@0 30 private:
michael@0 31 bool changedSlopes(const SkPoint& pt) const;
michael@0 32 void moveTo();
michael@0 33
michael@0 34 SkPath* fPathPtr;
michael@0 35 SkPoint fDefer[2];
michael@0 36 SkPoint fFirstPt;
michael@0 37 int fCloses;
michael@0 38 int fMoves;
michael@0 39 bool fEmpty;
michael@0 40 bool fHasMove;
michael@0 41 bool fMoved;
michael@0 42 };
michael@0 43
michael@0 44
michael@0 45 #endif /* defined(__PathOps__SkPathWriter__) */

mercurial