#include <SkPathOpsLine.h>
|
static double | ExactPointH (const SkDPoint &xy, double left, double right, double y) |
|
static double | ExactPointV (const SkDPoint &xy, double top, double bottom, double x) |
|
static double | NearPointH (const SkDPoint &xy, double left, double right, double y) |
|
static double | NearPointV (const SkDPoint &xy, double top, double bottom, double x) |
|
Definition at line 14 of file SkPathOpsLine.h.
◆ dump()
void SkDLine::dump |
( |
| ) |
const |
Definition at line 163 of file PathOpsDebug.cpp.
163 {
166}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
◆ dumpID()
void SkDLine::dumpID |
( |
int |
id | ) |
const |
◆ dumpInner()
void SkDLine::dumpInner |
( |
| ) |
const |
◆ exactPoint()
double SkDLine::exactPoint |
( |
const SkDPoint & |
xy | ) |
const |
Definition at line 26 of file SkPathOpsLine.cpp.
26 {
28 return 0;
29 }
31 return 1;
32 }
33 return -1;
34}
◆ ExactPointH()
double SkDLine::ExactPointH |
( |
const SkDPoint & |
xy, |
|
|
double |
left, |
|
|
double |
right, |
|
|
double |
y |
|
) |
| |
|
static |
Definition at line 86 of file SkPathOpsLine.cpp.
86 {
89 return 0;
90 }
92 return 1;
93 }
94 }
95 return -1;
96}
static bool left(const SkPoint &p0, const SkPoint &p1)
static bool right(const SkPoint &p0, const SkPoint &p1)
◆ ExactPointV()
double SkDLine::ExactPointV |
( |
const SkDPoint & |
xy, |
|
|
double |
top, |
|
|
double |
bottom, |
|
|
double |
x |
|
) |
| |
|
static |
Definition at line 121 of file SkPathOpsLine.cpp.
121 {
124 return 0;
125 }
126 if (xy.
fY == bottom) {
127 return 1;
128 }
129 }
130 return -1;
131}
◆ nearPoint()
double SkDLine::nearPoint |
( |
const SkDPoint & |
xy, |
|
|
bool * |
unequal |
|
) |
| const |
Definition at line 36 of file SkPathOpsLine.cpp.
36 {
39 return -1;
40 }
41
45 double numer =
len.fX * ab0.
fX + ab0.
fY *
len.fY;
46 if (!
between(0, numer, denom)) {
47 return -1;
48 }
49 if (!denom) {
50 return 0;
51 }
52 double t = numer / denom;
55
58 largest =
std::max(largest, -tiniest);
60 return -1;
61 }
62 if (unequal) {
63 *unequal = (
float) largest != (
float) (largest + dist);
64 }
67 return t;
68}
bool AlmostEqualUlps_Pin(float a, float b)
bool AlmostBetweenUlps(float a, float b, float c)
bool between(double a, double b, double c)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
SkDPoint ptAtT(double t) const
double distance(const SkDPoint &a) const
◆ NearPointH()
double SkDLine::NearPointH |
( |
const SkDPoint & |
xy, |
|
|
double |
left, |
|
|
double |
right, |
|
|
double |
y |
|
) |
| |
|
static |
Definition at line 98 of file SkPathOpsLine.cpp.
98 {
100 return -1;
101 }
103 return -1;
104 }
108 double realPtX = (1 - t) *
left + t *
right;
110 double distSq = distU.
fX * distU.
fX + distU.
fY * distU.
fY;
111 double dist =
sqrt(distSq);
114 largest =
std::max(largest, -tiniest);
116 return -1;
117 }
118 return t;
119}
bool AlmostEqualUlps(const SkPoint &pt1, const SkPoint &pt2)
bool AlmostBequalUlps(float a, float b)
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
◆ NearPointV()
double SkDLine::NearPointV |
( |
const SkDPoint & |
xy, |
|
|
double |
top, |
|
|
double |
bottom, |
|
|
double |
x |
|
) |
| |
|
static |
Definition at line 133 of file SkPathOpsLine.cpp.
133 {
135 return -1;
136 }
138 return -1;
139 }
140 double t = (xy.
fY - top) / (bottom - top);
143 double realPtY = (1 - t) * top + t * bottom;
145 double distSq = distU.
fX * distU.
fX + distU.
fY * distU.
fY;
146 double dist =
sqrt(distSq);
149 largest =
std::max(largest, -tiniest);
151 return -1;
152 }
153 return t;
154}
◆ nearRay()
bool SkDLine::nearRay |
( |
const SkDPoint & |
xy | ) |
const |
Definition at line 70 of file SkPathOpsLine.cpp.
70 {
71
75 double numer =
len.fX * ab0.
fX + ab0.
fY *
len.fY;
76 double t = numer / denom;
79
82 largest =
std::max(largest, -tiniest);
84}
bool RoughlyEqualUlps(float a, float b)
◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ ptAtT()
SkDPoint SkDLine::ptAtT |
( |
double |
t | ) |
const |
Definition at line 14 of file SkPathOpsLine.cpp.
14 {
15 if (0 == t) {
17 }
18 if (1 == t) {
20 }
21 double one_t = 1 - t;
24}
◆ set()
◆ fPts
The documentation for this struct was generated from the following files: