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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/pathops/SkPathWriter.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +/*
     1.5 + * Copyright 2012 Google Inc.
     1.6 + *
     1.7 + * Use of this source code is governed by a BSD-style license that can be
     1.8 + * found in the LICENSE file.
     1.9 + */
    1.10 +#ifndef SkPathWriter_DEFINED
    1.11 +#define SkPathWriter_DEFINED
    1.12 +
    1.13 +#include "SkPath.h"
    1.14 +
    1.15 +class SkPathWriter {
    1.16 +public:
    1.17 +    SkPathWriter(SkPath& path);
    1.18 +    void close();
    1.19 +    void cubicTo(const SkPoint& pt1, const SkPoint& pt2, const SkPoint& pt3);
    1.20 +    void deferredLine(const SkPoint& pt);
    1.21 +    void deferredMove(const SkPoint& pt);
    1.22 +    void deferredMoveLine(const SkPoint& pt);
    1.23 +    bool hasMove() const;
    1.24 +    void init();
    1.25 +    bool isClosed() const;
    1.26 +    bool isEmpty() const { return fEmpty; }
    1.27 +    void lineTo();
    1.28 +    const SkPath* nativePath() const;
    1.29 +    void nudge();
    1.30 +    void quadTo(const SkPoint& pt1, const SkPoint& pt2);
    1.31 +    bool someAssemblyRequired() const;
    1.32 +
    1.33 +private:
    1.34 +    bool changedSlopes(const SkPoint& pt) const;
    1.35 +    void moveTo();
    1.36 +
    1.37 +    SkPath* fPathPtr;
    1.38 +    SkPoint fDefer[2];
    1.39 +    SkPoint fFirstPt;
    1.40 +    int fCloses;
    1.41 +    int fMoves;
    1.42 +    bool fEmpty;
    1.43 +    bool fHasMove;
    1.44 +    bool fMoved;
    1.45 +};
    1.46 +
    1.47 +
    1.48 +#endif /* defined(__PathOps__SkPathWriter__) */

mercurial