Go to the source code of this file.
◆ handle_zero()
static int handle_zero |
( |
const double |
B, |
|
|
const double |
C, |
|
|
double |
s[2] |
|
) |
| |
|
static |
Definition at line 151 of file SkPathOpsQuad.cpp.
151 {
155 }
157 return 1;
158}
static bool approximately_zero(double x)
◆ interp_quad_coords() [1/2]
static void interp_quad_coords |
( |
const double * |
src, |
|
|
double * |
dst, |
|
|
double |
t |
|
) |
| |
|
static |
Definition at line 344 of file SkPathOpsQuad.cpp.
344 {
352}
double SkDInterp(double A, double B, double t)
const CatchEntryMove ab[]
◆ interp_quad_coords() [2/2]
static double interp_quad_coords |
( |
const double * |
src, |
|
|
double |
t |
|
) |
| |
|
static |
Definition at line 240 of file SkPathOpsQuad.cpp.
240 {
241 if (0 == t) {
243 }
244 if (1 == t) {
246 }
250 return abc;
251}
◆ matchesEnd()
◆ pointInTriangle()
Definition at line 21 of file SkPathOpsQuad.cpp.
21 {
25 double dot00 = v0.
dot(v0);
26 double dot01 = v0.
dot(v1);
27 double dot02 = v0.
dot(
v2);
28 double dot11 = v1.
dot(v1);
29 double dot12 = v1.
dot(
v2);
30
31 double denom = dot00 * dot11 - dot01 * dot01;
32 double u = dot11 * dot02 - dot01 * dot12;
33 double v = dot00 * dot12 - dot01 * dot02;
34
35 if (denom >= 0) {
36 return u >= 0 && v >= 0 && u + v < denom;
37 }
38 return u <= 0 && v <= 0 && u + v > denom;
39}
double dot(const SkDVector &a) const
◆ valid_unit_divide()
static int valid_unit_divide |
( |
double |
numer, |
|
|
double |
denom, |
|
|
double * |
ratio |
|
) |
| |
|
static |
Definition at line 362 of file SkPathOpsQuad.cpp.
363{
364 if (numer < 0) {
365 numer = -numer;
366 denom = -denom;
367 }
368 if (denom == 0 || numer == 0 || numer >= denom) {
369 return 0;
370 }
371 double r = numer / denom;
372 if (r == 0) {
373 return 0;
374 }
375 *ratio = r;
376 return 1;
377}