Flutter Engine
The Flutter Engine
|
#include <SkPathOpsCubic.h>
Public Types | |
enum | SearchAxis { kXAxis , kYAxis } |
Public Member Functions | |
bool | collapsed () const |
bool | controlsInside () const |
const SkDPoint & | operator[] (int n) const |
SkDPoint & | operator[] (int n) |
void | align (int endIndex, int ctrlIndex, SkDPoint *dstPt) const |
double | binarySearch (double min, double max, double axisIntercept, SearchAxis xAxis) const |
double | calcPrecision () const |
SkDCubicPair | chopAt (double t) const |
int | convexHull (char order[kPointCount]) const |
void | debugInit () |
void | debugSet (const SkDPoint *pts) |
void | dump () const |
void | dumpID (int id) const |
void | dumpInner () const |
SkDVector | dxdyAtT (double t) const |
bool | endsAreExtremaInXOrY () const |
int | findInflections (double tValues[2]) const |
int | findMaxCurvature (double tValues[]) const |
bool | hullIntersects (const SkDCubic &c2, bool *isLinear) const |
bool | hullIntersects (const SkDConic &c, bool *isLinear) const |
bool | hullIntersects (const SkDQuad &c2, bool *isLinear) const |
bool | hullIntersects (const SkDPoint *pts, int ptCount, bool *isLinear) const |
bool | isLinear (int startIndex, int endIndex) const |
bool | monotonicInX () const |
bool | monotonicInY () const |
void | otherPts (int index, const SkDPoint *o1Pts[kPointCount - 1]) const |
SkDPoint | ptAtT (double t) const |
int | searchRoots (double extremes[6], int extrema, double axisIntercept, SearchAxis xAxis, double *validRoots) const |
bool | toFloatPoints (SkPoint *) const |
int | horizontalIntersect (double yIntercept, double roots[3]) const |
int | verticalIntersect (double xIntercept, double roots[3]) const |
const SkDCubic & | set (const SkPoint pts[kPointCount] SkDEBUGPARAMS(SkOpGlobalState *state=nullptr)) |
SkDCubic | subDivide (double t1, double t2) const |
void | subDivide (double t1, double t2, SkDCubic *c) const |
void | subDivide (const SkDPoint &a, const SkDPoint &d, double t1, double t2, SkDPoint p[2]) const |
double | top (const SkDCubic &dCurve, double startT, double endT, SkDPoint *topPt) const |
SkDQuad | toQuad () const |
Static Public Member Functions | |
static bool | IsConic () |
static void | Coefficients (const double *cubic, double *A, double *B, double *C, double *D) |
static int | ComplexBreak (const SkPoint pts[4], SkScalar *t) |
static int | FindExtrema (const double src[], double tValue[2]) |
static int | FindInflections (const SkPoint a[kPointCount], double tValues[2]) |
static int | maxIntersections () |
static int | pointCount () |
static int | pointLast () |
static int | RootsReal (double A, double B, double C, double D, double t[3]) |
static int | RootsValidT (const double A, const double B, const double C, double D, double s[3]) |
static SkDCubic | SubDivide (const SkPoint a[kPointCount], double t1, double t2) |
static void | SubDivide (const SkPoint pts[kPointCount], const SkDPoint &a, const SkDPoint &d, double t1, double t2, SkDPoint p[2]) |
Public Attributes | |
SkDPoint | fPts [kPointCount] |
Static Public Attributes | |
static const int | kPointCount = 4 |
static const int | kPointLast = kPointCount - 1 |
static const int | kMaxIntersections = 9 |
static const int | gPrecisionUnit = 256 |
Definition at line 29 of file SkPathOpsCubic.h.
enum SkDCubic::SearchAxis |
Enumerator | |
---|---|
kXAxis | |
kYAxis |
Definition at line 34 of file SkPathOpsCubic.h.
Definition at line 28 of file SkPathOpsCubic.cpp.
double SkDCubic::binarySearch | ( | double | min, |
double | max, | ||
double | axisIntercept, | ||
SearchAxis | xAxis | ||
) | const |
Definition at line 39 of file SkPathOpsCubic.cpp.
double SkDCubic::calcPrecision | ( | ) | const |
Definition at line 87 of file SkPathOpsCubic.cpp.
SkDCubicPair SkDCubic::chopAt | ( | double | t | ) | const |
Definition at line 111 of file SkPathOpsCubic.cpp.
|
static |
Definition at line 134 of file SkPathOpsCubic.cpp.
|
inline |
Definition at line 39 of file SkPathOpsCubic.h.
Definition at line 254 of file SkPathOpsCubic.cpp.
|
inline |
Definition at line 44 of file SkPathOpsCubic.h.
int SkDCubic::convexHull | ( | char | order[kPointCount] | ) | const |
Definition at line 60 of file SkOpCubicHull.cpp.
|
inline |
void SkDCubic::debugSet | ( | const SkDPoint * | pts | ) |
Definition at line 712 of file SkPathOpsDebug.cpp.
void SkDCubic::dump | ( | ) | const |
Definition at line 104 of file PathOpsDebug.cpp.
void SkDCubic::dumpID | ( | int | id | ) | const |
Definition at line 109 of file PathOpsDebug.cpp.
void SkDCubic::dumpInner | ( | ) | const |
Definition at line 117 of file PathOpsDebug.cpp.
SkDVector SkDCubic::dxdyAtT | ( | double | t | ) | const |
Definition at line 509 of file SkPathOpsCubic.cpp.
bool SkDCubic::endsAreExtremaInXOrY | ( | ) | const |
|
static |
SkDCubic'(t) = At^2 + Bt + C, where A = 3(-a + 3(b - c) + d) B = 6(a - 2b + c) C = 3(b - a) Solve for t, keeping only those that fit between 0 < t < 1
Definition at line 555 of file SkPathOpsCubic.cpp.
int SkDCubic::findInflections | ( | double | tValues[2] | ) | const |
Definition at line 529 of file SkPathOpsCubic.cpp.
int SkDCubic::findMaxCurvature | ( | double | tValues[] | ) | const |
Definition at line 580 of file SkPathOpsCubic.cpp.
int SkDCubic::horizontalIntersect | ( | double | yIntercept, |
double | roots[3] | ||
) | const |
Return the number of valid roots (0 < root < 1) for this cubic intersecting the specified horizontal line.
Definition at line 458 of file SkDCubicLineIntersection.cpp.
bool SkDCubic::hullIntersects | ( | const SkDConic & | c, |
bool * | isLinear | ||
) | const |
Definition at line 215 of file SkPathOpsCubic.cpp.
bool SkDCubic::hullIntersects | ( | const SkDCubic & | c2, |
bool * | isLinear | ||
) | const |
Definition at line 207 of file SkPathOpsCubic.cpp.
Definition at line 158 of file SkPathOpsCubic.cpp.
bool SkDCubic::hullIntersects | ( | const SkDQuad & | c2, |
bool * | isLinear | ||
) | const |
Definition at line 211 of file SkPathOpsCubic.cpp.
|
inlinestatic |
Definition at line 53 of file SkPathOpsCubic.h.
Definition at line 220 of file SkPathOpsCubic.cpp.
|
inlinestatic |
Definition at line 96 of file SkPathOpsCubic.h.
bool SkDCubic::monotonicInX | ( | ) | const |
Definition at line 334 of file SkPathOpsCubic.cpp.
bool SkDCubic::monotonicInY | ( | ) | const |
Definition at line 339 of file SkPathOpsCubic.cpp.
Definition at line 56 of file SkPathOpsCubic.h.
Definition at line 55 of file SkPathOpsCubic.h.
Definition at line 344 of file SkPathOpsCubic.cpp.
|
inlinestatic |
Definition at line 100 of file SkPathOpsCubic.h.
|
inlinestatic |
Definition at line 101 of file SkPathOpsCubic.h.
SkDPoint SkDCubic::ptAtT | ( | double | t | ) | const |
Definition at line 591 of file SkPathOpsCubic.cpp.
|
static |
Definition at line 412 of file SkPathOpsCubic.cpp.
|
static |
Definition at line 382 of file SkPathOpsCubic.cpp.
int SkDCubic::searchRoots | ( | double | extremes[6], |
int | extrema, | ||
double | axisIntercept, | ||
SearchAxis | xAxis, | ||
double * | validRoots | ||
) | const |
Definition at line 351 of file SkPathOpsCubic.cpp.
|
inline |
void SkDCubic::subDivide | ( | const SkDPoint & | a, |
const SkDPoint & | d, | ||
double | t1, | ||
double | t2, | ||
SkDPoint | p[2] | ||
) | const |
Definition at line 696 of file SkPathOpsCubic.cpp.
|
inlinestatic |
Definition at line 142 of file SkPathOpsCubic.h.
SkDCubic SkDCubic::subDivide | ( | double | t1, |
double | t2 | ||
) | const |
Definition at line 666 of file SkPathOpsCubic.cpp.
|
inline |
Definition at line 133 of file SkPathOpsCubic.h.
bool SkDCubic::toFloatPoints | ( | SkPoint * | pts | ) | const |
Definition at line 723 of file SkPathOpsCubic.cpp.
double SkDCubic::top | ( | const SkDCubic & | dCurve, |
double | startT, | ||
double | endT, | ||
SkDPoint * | topPt | ||
) | const |
Definition at line 735 of file SkPathOpsCubic.cpp.
SkDQuad SkDCubic::toQuad | ( | ) | const |
Definition at line 36 of file SkDCubicToQuads.cpp.
int SkDCubic::verticalIntersect | ( | double | xIntercept, |
double | roots[3] | ||
) | const |
Return the number of valid roots (0 < root < 1) for this cubic intersecting the specified vertical line.
Definition at line 462 of file SkDCubicLineIntersection.cpp.
SkDPoint SkDCubic::fPts[kPointCount] |
Definition at line 152 of file SkPathOpsCubic.h.
|
static |
Definition at line 151 of file SkPathOpsCubic.h.
|
static |
Definition at line 32 of file SkPathOpsCubic.h.
|
static |
Definition at line 30 of file SkPathOpsCubic.h.
|
static |
Definition at line 31 of file SkPathOpsCubic.h.