Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
SkPathOpsConic.cpp File Reference
#include "src/pathops/SkPathOpsConic.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkFloatingPoint.h"
#include "src/pathops/SkIntersections.h"
#include "src/pathops/SkPathOpsCubic.h"
#include "src/pathops/SkPathOpsQuad.h"
#include "src/pathops/SkPathOpsRect.h"
#include "src/pathops/SkPathOpsTypes.h"
#include <cmath>

Go to the source code of this file.

Functions

static void conic_deriv_coeff (const double src[], SkScalar w, double coeff[3])
 
static double conic_eval_tan (const double coord[], SkScalar w, double t)
 
static double conic_eval_numerator (const double src[], SkScalar w, double t)
 
static double conic_eval_denominator (SkScalar w, double t)
 

Function Documentation

◆ conic_deriv_coeff()

static void conic_deriv_coeff ( const double  src[],
SkScalar  w,
double  coeff[3] 
)
static

Definition at line 22 of file SkPathOpsConic.cpp.

24 {
25 const double P20 = src[4] - src[0];
26 const double P10 = src[2] - src[0];
27 const double wP10 = w * P10;
28 coeff[0] = w * P20 - P20;
29 coeff[1] = P20 - 2 * wP10;
30 coeff[2] = wP10;
31}
SkScalar w

◆ conic_eval_denominator()

static double conic_eval_denominator ( SkScalar  w,
double  t 
)
static

Definition at line 84 of file SkPathOpsConic.cpp.

84 {
85 double B = 2 * (w - 1);
86 double C = 1;
87 double A = -B;
88 return (A * t + B) * t + C;
89}
#define C(TEST_CATEGORY)
Definition colrv1.cpp:247
#define B

◆ conic_eval_numerator()

static double conic_eval_numerator ( const double  src[],
SkScalar  w,
double  t 
)
static

Definition at line 73 of file SkPathOpsConic.cpp.

73 {
74 SkASSERT(src);
75 SkASSERT(t >= 0 && t <= 1);
76 double src2w = src[2] * w;
77 double C = src[0];
78 double A = src[4] - 2 * src2w + C;
79 double B = 2 * (src2w - C);
80 return (A * t + B) * t + C;
81}
#define SkASSERT(cond)
Definition SkAssert.h:116

◆ conic_eval_tan()

static double conic_eval_tan ( const double  coord[],
SkScalar  w,
double  t 
)
static

Definition at line 33 of file SkPathOpsConic.cpp.

33 {
34 double coeff[3];
35 conic_deriv_coeff(coord, w, coeff);
36 return t * (t * coeff[0] + coeff[1]) + coeff[2];
37}
static void conic_deriv_coeff(const double src[], SkScalar w, double coeff[3])