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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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 SkDQuadImplicit_DEFINED
     8 #define SkDQuadImplicit_DEFINED
    10 #include "SkPathOpsQuad.h"
    12 class SkDQuadImplicit {
    13 public:
    14     explicit SkDQuadImplicit(const SkDQuad& q);
    16     bool match(const SkDQuadImplicit& two) const;
    17     static bool Match(const SkDQuad& quad1, const SkDQuad& quad2);
    19     double x2() const { return fP[kXx_Coeff]; }
    20     double xy() const { return fP[kXy_Coeff]; }
    21     double y2() const { return fP[kYy_Coeff]; }
    22     double x() const { return fP[kX_Coeff]; }
    23     double y() const { return fP[kY_Coeff]; }
    24     double c() const { return fP[kC_Coeff]; }
    26 private:
    27     enum Coeffs {
    28         kXx_Coeff,
    29         kXy_Coeff,
    30         kYy_Coeff,
    31         kX_Coeff,
    32         kY_Coeff,
    33         kC_Coeff,
    34     };
    36     double fP[kC_Coeff + 1];
    37 };
    39 #endif

mercurial