8#ifndef SkPathOpsCubic_DEFINED
9#define SkPathOpsCubic_DEFINED
50 return v03.
dot(v01) > 0 && v03.
dot(v02) > 0 && v03.
dot(v13) > 0 && v03.
dot(v23) > 0;
58 void align(
int endIndex,
int ctrlIndex,
SkDPoint* dstPt)
const;
82 return cubic.set(
a).findInflections(tValues);
95 bool isLinear(
int startIndex,
int endIndex)
const;
103 static int RootsReal(
double A,
double B,
double C,
double D,
double t[3]);
104 static int RootsValidT(
const double A,
const double B,
const double C,
double D,
double s[3]);
106 int searchRoots(
double extremes[6],
int extrema,
double axisIntercept,
137 return cubic.set(
a).subDivide(t1, t2);
145 cubic.set(pts).subDivide(
a,
d, t1, t2,
p);
171 return 1 >> (3 - (one ^
two)) ^ 3;
215 void dumpID(
int id)
const override {
return fCubic.
dumpID(
id); }
233 bool IsConic()
const override {
return false; }
sk_bzero(glyphs, sizeof(glyphs))
int other_two(int one, int two)
#define SkDEBUGPARAMS(...)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
void otherPts(int oddMan, const SkDPoint *endPt[2]) const override
bool hullIntersects(const SkDQuad &quad, bool *isLinear) const override
void subDivide(double t1, double t2, SkTCurve *curve) const override
SkDPoint & operator[](int n) override
bool hullIntersects(const SkDCubic &cubic, bool *isLinear) const override
bool controlsInside() const override
SkTCurve * make(SkArenaAlloc &heap) const override
const SkDPoint & operator[](int n) const override
SkDPoint ptAtT(double t) const override
int pointLast() const override
int pointCount() const override
int intersectRay(SkIntersections *i, const SkDLine &line) const override
SkDVector dxdyAtT(double t) const override
bool collapsed() const override
bool IsConic() const override
void debugInit() override
bool hullIntersects(const SkTCurve &curve, bool *isLinear) const override
void setBounds(SkDRect *) const override
int maxIntersections() const override
SkTCubic(const SkDCubic &c)
virtual bool hullIntersects(const SkDQuad &, bool *isLinear) const =0
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
static float max(float r, float g, float b)
static float min(float r, float g, float b)
int findMaxCurvature(double tValues[]) const
int convexHull(char order[kPointCount]) const
bool hullIntersects(const SkDCubic &c2, bool *isLinear) const
bool toFloatPoints(SkPoint *) const
void subDivide(double t1, double t2, SkDCubic *c) const
static int maxIntersections()
bool isLinear(int startIndex, int endIndex) const
static const int kPointLast
SkDCubicPair chopAt(double t) const
void debugSet(const SkDPoint *pts)
static int RootsReal(double A, double B, double C, double D, double t[3])
double binarySearch(double min, double max, double axisIntercept, SearchAxis xAxis) const
int horizontalIntersect(double yIntercept, double roots[3]) const
int findInflections(double tValues[2]) const
bool monotonicInX() const
void dumpID(int id) const
const SkDPoint & operator[](int n) const
bool endsAreExtremaInXOrY() const
int verticalIntersect(double xIntercept, double roots[3]) const
static SkDCubic SubDivide(const SkPoint a[kPointCount], double t1, double t2)
void align(int endIndex, int ctrlIndex, SkDPoint *dstPt) const
const SkDCubic & set(const SkPoint pts[kPointCount] SkDEBUGPARAMS(SkOpGlobalState *state=nullptr))
static int FindInflections(const SkPoint a[kPointCount], double tValues[2])
double calcPrecision() const
SkDPoint fPts[kPointCount]
bool monotonicInY() const
static const int gPrecisionUnit
static int FindExtrema(const double src[], double tValue[2])
double top(const SkDCubic &dCurve, double startT, double endT, SkDPoint *topPt) const
bool controlsInside() const
static void Coefficients(const double *cubic, double *A, double *B, double *C, double *D)
int searchRoots(double extremes[6], int extrema, double axisIntercept, SearchAxis xAxis, double *validRoots) const
static const int kMaxIntersections
static int RootsValidT(const double A, const double B, const double C, double D, double s[3])
SkDPoint & operator[](int n)
SkDVector dxdyAtT(double t) const
SkDPoint ptAtT(double t) const
static void SubDivide(const SkPoint pts[kPointCount], const SkDPoint &a, const SkDPoint &d, double t1, double t2, SkDPoint p[2])
void otherPts(int index, const SkDPoint *o1Pts[kPointCount - 1]) const
static const int kPointCount
SkDCubic subDivide(double t1, double t2) const
static int ComplexBreak(const SkPoint pts[4], SkScalar *t)
bool approximatelyEqual(const SkDPoint &a) const
double dot(const SkDVector &a) const