Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /*
2 * Copyright 2012 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7 #ifndef SkPathWriter_DEFINED
8 #define SkPathWriter_DEFINED
10 #include "SkPath.h"
12 class SkPathWriter {
13 public:
14 SkPathWriter(SkPath& path);
15 void close();
16 void cubicTo(const SkPoint& pt1, const SkPoint& pt2, const SkPoint& pt3);
17 void deferredLine(const SkPoint& pt);
18 void deferredMove(const SkPoint& pt);
19 void deferredMoveLine(const SkPoint& pt);
20 bool hasMove() const;
21 void init();
22 bool isClosed() const;
23 bool isEmpty() const { return fEmpty; }
24 void lineTo();
25 const SkPath* nativePath() const;
26 void nudge();
27 void quadTo(const SkPoint& pt1, const SkPoint& pt2);
28 bool someAssemblyRequired() const;
30 private:
31 bool changedSlopes(const SkPoint& pt) const;
32 void moveTo();
34 SkPath* fPathPtr;
35 SkPoint fDefer[2];
36 SkPoint fFirstPt;
37 int fCloses;
38 int fMoves;
39 bool fEmpty;
40 bool fHasMove;
41 bool fMoved;
42 };
45 #endif /* defined(__PathOps__SkPathWriter__) */