#include "src/base/SkBezierCurves.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkFloatingPoint.h"
#include "include/private/base/SkPoint_impl.h"
#include "src/base/SkCubics.h"
#include "src/base/SkQuads.h"
#include <cstddef>
static inline double interpolate(double A, double B, double t) { … }
std::array<double, 2> SkBezierCubic::EvalAt(const double curve[8], double t) { … }
void SkBezierCubic::Subdivide(const double curve[8], double t,
double twoCurves[14]) { … }
std::array<double, 4> SkBezierCubic::ConvertToPolynomial(const double curve[8], bool yValues) { … }
namespace {
struct DPoint { … };
DPoint operator- (DPoint a) { … }
DPoint operator+ (DPoint a, DPoint b) { … }
DPoint operator- (DPoint a, DPoint b) { … }
DPoint operator* (double s, DPoint a) { … }
double pinTRange(double t) { … }
}
SkSpan<const float>
SkBezierCubic::IntersectWithHorizontalLine(
SkSpan<const SkPoint> controlPoints, float yIntercept, float* intersectionStorage) { … }
SkSpan<const float>
SkBezierCubic::Intersect(double AX, double BX, double CX, double DX,
double AY, double BY, double CY, double DY,
float toIntersect, float intersectionsStorage[3]) { … }
SkSpan<const float>
SkBezierQuad::IntersectWithHorizontalLine(SkSpan<const SkPoint> controlPoints, float yIntercept,
float intersectionStorage[2]) { … }
SkSpan<const float> SkBezierQuad::Intersect(
double AX, double BX, double CX, double AY, double BY, double CY,
double yIntercept, float intersectionStorage[2]) { … }