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

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/skia/trunk/src/pathops/SkDQuadImplicit.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     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 SkDQuadImplicit_DEFINED
    1.11 +#define SkDQuadImplicit_DEFINED
    1.12 +
    1.13 +#include "SkPathOpsQuad.h"
    1.14 +
    1.15 +class SkDQuadImplicit {
    1.16 +public:
    1.17 +    explicit SkDQuadImplicit(const SkDQuad& q);
    1.18 +
    1.19 +    bool match(const SkDQuadImplicit& two) const;
    1.20 +    static bool Match(const SkDQuad& quad1, const SkDQuad& quad2);
    1.21 +
    1.22 +    double x2() const { return fP[kXx_Coeff]; }
    1.23 +    double xy() const { return fP[kXy_Coeff]; }
    1.24 +    double y2() const { return fP[kYy_Coeff]; }
    1.25 +    double x() const { return fP[kX_Coeff]; }
    1.26 +    double y() const { return fP[kY_Coeff]; }
    1.27 +    double c() const { return fP[kC_Coeff]; }
    1.28 +
    1.29 +private:
    1.30 +    enum Coeffs {
    1.31 +        kXx_Coeff,
    1.32 +        kXy_Coeff,
    1.33 +        kYy_Coeff,
    1.34 +        kX_Coeff,
    1.35 +        kY_Coeff,
    1.36 +        kC_Coeff,
    1.37 +    };
    1.38 +
    1.39 +    double fP[kC_Coeff + 1];
    1.40 +};
    1.41 +
    1.42 +#endif

mercurial