#include <SkLineParameters.h>
Definition at line 28 of file SkLineParameters.h.
◆ controlPtDistance() [1/2]
double SkLineParameters::controlPtDistance |
( |
const SkDCubic & |
pts, |
|
|
int |
index |
|
) |
| const |
|
inline |
Definition at line 154 of file SkLineParameters.h.
154 {
156 return fA * pts[index].fX + fB * pts[index].fY + fC;
157 }
◆ controlPtDistance() [2/2]
double SkLineParameters::controlPtDistance |
( |
const SkDQuad & |
pts | ) |
const |
|
inline |
Definition at line 159 of file SkLineParameters.h.
159 {
160 return fA * pts[1].fX + fB * pts[1].fY + fC;
161 }
◆ cubicDistanceY()
void SkLineParameters::cubicDistanceY |
( |
const SkDCubic & |
pts, |
|
|
SkDCubic & |
distance |
|
) |
| const |
|
inline |
Definition at line 138 of file SkLineParameters.h.
138 {
139 double oneThird = 1 / 3.0;
140 for (int index = 0; index < 4; ++index) {
141 distance[index].fX = index * oneThird;
142 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC;
143 }
144 }
◆ cubicEndPoints() [1/2]
bool SkLineParameters::cubicEndPoints |
( |
const SkDCubic & |
pts | ) |
|
|
inline |
Definition at line 31 of file SkLineParameters.h.
31 {
32 int endIndex = 1;
35 return true;
36 }
41 return true;
42 }
46 return false;
47 }
48 }
49
51 return true;
52 }
53
54
56 if (pts[0].fY > pts[endIndex].fY) {
57 fA = DBL_EPSILON;
58 }
59 return true;
60 }
61 if (endIndex == 3) {
62 return true;
63 }
65 if (pts[0].fY > pts[3].fY) {
66 fA = DBL_EPSILON;
67 }
68 return true;
69 }
bool NotAlmostEqualUlps(float a, float b)
bool cubicEndPoints(const SkDCubic &pts)
◆ cubicEndPoints() [2/2]
void SkLineParameters::cubicEndPoints |
( |
const SkDCubic & |
pts, |
|
|
int |
s, |
|
|
int |
e |
|
) |
| |
|
inline |
Definition at line 71 of file SkLineParameters.h.
71 {
72 fA = pts[
s].fY - pts[
e].fY;
73 fB = pts[
e].fX - pts[
s].fX;
74 fC = pts[
s].fX * pts[
e].fY - pts[
e].fX * pts[
s].fY;
75 }
◆ cubicPart()
double SkLineParameters::cubicPart |
( |
const SkDCubic & |
part | ) |
|
|
inline |
Definition at line 77 of file SkLineParameters.h.
77 {
79 if (part[0] == part[1] || ((
const SkDLine& ) part[0]).nearRay(part[2])) {
81 }
83 }
double pointDistance(const SkDPoint &pt) const
◆ dx()
double SkLineParameters::dx |
( |
| ) |
const |
|
inline |
◆ dy()
double SkLineParameters::dy |
( |
| ) |
const |
|
inline |
◆ lineEndPoints()
void SkLineParameters::lineEndPoints |
( |
const SkDLine & |
pts | ) |
|
|
inline |
Definition at line 85 of file SkLineParameters.h.
85 {
86 fA = pts[0].fY - pts[1].fY;
87 fB = pts[1].fX - pts[0].fX;
88 fC = pts[0].fX * pts[1].fY - pts[1].fX * pts[0].fY;
89 }
◆ normalize()
bool SkLineParameters::normalize |
( |
| ) |
|
|
inline |
Definition at line 125 of file SkLineParameters.h.
125 {
128 fA = fB = fC = 0;
129 return false;
130 }
131 double reciprocal = 1 /
normal;
132 fA *= reciprocal;
133 fB *= reciprocal;
134 fC *= reciprocal;
135 return true;
136 }
static bool approximately_zero(double x)
double normalSquared() const
SIN Vec< N, float > sqrt(const Vec< N, float > &x)
◆ normalSquared()
double SkLineParameters::normalSquared |
( |
| ) |
const |
|
inline |
◆ pointDistance()
double SkLineParameters::pointDistance |
( |
const SkDPoint & |
pt | ) |
const |
|
inline |
◆ quadDistanceY()
void SkLineParameters::quadDistanceY |
( |
const SkDQuad & |
pts, |
|
|
SkDQuad & |
distance |
|
) |
| const |
|
inline |
Definition at line 146 of file SkLineParameters.h.
146 {
147 double oneHalf = 1 / 2.0;
148 for (int index = 0; index < 3; ++index) {
149 distance[index].fX = index * oneHalf;
150 distance[index].fY = fA * pts[index].fX + fB * pts[index].fY + fC;
151 }
152 }
◆ quadEndPoints() [1/2]
bool SkLineParameters::quadEndPoints |
( |
const SkDQuad & |
pts | ) |
|
|
inline |
Definition at line 91 of file SkLineParameters.h.
91 {
94 return true;
95 }
98 return false;
99 }
101 return true;
102 }
103
104 if (pts[0].fY > pts[2].fY) {
105 fA = DBL_EPSILON;
106 }
107 return true;
108 }
bool quadEndPoints(const SkDQuad &pts)
◆ quadEndPoints() [2/2]
void SkLineParameters::quadEndPoints |
( |
const SkDQuad & |
pts, |
|
|
int |
s, |
|
|
int |
e |
|
) |
| |
|
inline |
Definition at line 110 of file SkLineParameters.h.
110 {
111 fA = pts[
s].fY - pts[
e].fY;
112 fB = pts[
e].fX - pts[
s].fX;
113 fC = pts[
s].fX * pts[
e].fY - pts[
e].fX * pts[
s].fY;
114 }
◆ quadPart()
double SkLineParameters::quadPart |
( |
const SkDQuad & |
part | ) |
|
|
inline |
The documentation for this class was generated from the following file: