Go to the source code of this file.
|
static bool | quick_reject (const SkRect &bounds, const SkRect &clip) |
|
static void | clamp_le (SkScalar &value, SkScalar max) |
|
static void | clamp_ge (SkScalar &value, SkScalar min) |
|
static bool | sort_increasing_Y (SkPoint dst[], const SkPoint src[], int count) |
|
static bool | chopMonoQuadAt (SkScalar c0, SkScalar c1, SkScalar c2, SkScalar target, SkScalar *t) |
|
static bool | chopMonoQuadAtY (SkPoint pts[3], SkScalar y, SkScalar *t) |
|
static bool | chopMonoQuadAtX (SkPoint pts[3], SkScalar x, SkScalar *t) |
|
static void | chop_quad_in_Y (SkPoint pts[3], const SkRect &clip) |
|
static SkScalar | mono_cubic_closestT (const SkScalar src[], SkScalar x) |
|
static void | chop_mono_cubic_at_y (SkPoint src[4], SkScalar y, SkPoint dst[7]) |
|
static void | chop_cubic_in_Y (SkPoint pts[4], const SkRect &clip) |
|
static void | chop_mono_cubic_at_x (SkPoint src[4], SkScalar x, SkPoint dst[7]) |
|
static SkRect | compute_cubic_bounds (const SkPoint pts[4]) |
|
static bool | too_big_for_reliable_float_math (const SkRect &r) |
|
◆ chop_cubic_in_Y()
static void chop_cubic_in_Y |
( |
SkPoint |
pts[4], |
|
|
const SkRect & |
clip |
|
) |
| |
|
static |
Definition at line 288 of file SkEdgeClipper.cpp.
288 {
289
290
291 if (pts[0].fY <
clip.fTop) {
294
295
296
297
298
299
300
301
302
303
304
305 if (tmp[3].fY <
clip.fTop && tmp[4].fY <
clip.fTop && tmp[5].fY <
clip.fTop) {
307 memcpy(tmp2, &tmp[3].fX, 4 *
sizeof(
SkPoint));
309 }
310
311
312
315
316 pts[0] = tmp[3];
317 pts[1] = tmp[4];
318 pts[2] = tmp[5];
319 }
320
321
322 if (pts[3].fY >
clip.fBottom) {
327
328 pts[1] = tmp[1];
329 pts[2] = tmp[2];
330 pts[3] = tmp[3];
331 }
332}
static void clamp_le(SkScalar &value, SkScalar max)
static void chop_mono_cubic_at_y(SkPoint src[4], SkScalar y, SkPoint dst[7])
static void clamp_ge(SkScalar &value, SkScalar min)
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
◆ chop_mono_cubic_at_x()
Definition at line 334 of file SkEdgeClipper.cpp.
334 {
336 return;
337 }
339}
static SkScalar mono_cubic_closestT(const SkScalar src[], SkScalar x)
void SkChopCubicAt(const SkPoint src[4], SkPoint dst[7], SkScalar t)
bool SkChopMonoCubicAtX(const SkPoint src[4], SkScalar x, SkPoint dst[7])
◆ chop_mono_cubic_at_y()
Definition at line 280 of file SkEdgeClipper.cpp.
280 {
282 return;
283 }
285}
bool SkChopMonoCubicAtY(const SkPoint src[4], SkScalar y, SkPoint dst[7])
◆ chop_quad_in_Y()
static void chop_quad_in_Y |
( |
SkPoint |
pts[3], |
|
|
const SkRect & |
clip |
|
) |
| |
|
static |
Definition at line 100 of file SkEdgeClipper.cpp.
100 {
103
104
105 if (pts[0].fY <
clip.fTop) {
107
109
112
113 pts[0] = tmp[2];
114 pts[1] = tmp[3];
115 } else {
116
117
118 for (
int i = 0;
i < 3;
i++) {
119 if (pts[
i].fY <
clip.fTop) {
121 }
122 }
123 }
124 }
125
126
127 if (pts[2].fY >
clip.fBottom) {
130
133
134 pts[1] = tmp[1];
135 pts[2] = tmp[2];
136 } else {
137
138
139 for (
int i = 0;
i < 3;
i++) {
140 if (pts[
i].fY >
clip.fBottom) {
142 }
143 }
144 }
145 }
146}
static bool chopMonoQuadAtY(SkPoint pts[3], SkScalar y, SkScalar *t)
void SkChopQuadAt(const SkPoint src[3], SkPoint dst[5], SkScalar t)
◆ chopMonoQuadAt()
Definition at line 72 of file SkEdgeClipper.cpp.
73 {
74
75
76
77
81
86 return true;
87 }
88 return false;
89}
int SkFindUnitQuadRoots(SkScalar A, SkScalar B, SkScalar C, SkScalar roots[2])
◆ chopMonoQuadAtX()
Definition at line 95 of file SkEdgeClipper.cpp.
95 {
97}
static bool chopMonoQuadAt(SkScalar c0, SkScalar c1, SkScalar c2, SkScalar target, SkScalar *t)
◆ chopMonoQuadAtY()
◆ clamp_ge()
Definition at line 30 of file SkEdgeClipper.cpp.
30 {
33 }
34}
static float min(float r, float g, float b)
◆ clamp_le()
Definition at line 24 of file SkEdgeClipper.cpp.
24 {
27 }
28}
static float max(float r, float g, float b)
◆ compute_cubic_bounds()
Definition at line 405 of file SkEdgeClipper.cpp.
405 {
408 return r;
409}
void setBounds(const SkPoint pts[], int count)
◆ mono_cubic_closestT()
Definition at line 255 of file SkEdgeClipper.cpp.
255 {
266 do {
269 if (closest > dist) {
270 closest = dist;
271 bestT = t;
272 }
273 lastT = t;
276 } while (closest > 0.25f && lastT != t);
277 return bestT;
278}
static int step(int x, SkScalar min, SkScalar max)
#define SK_INIT_TO_AVOID_WARNING
◆ quick_reject()
static bool quick_reject |
( |
const SkRect & |
bounds, |
|
|
const SkRect & |
clip |
|
) |
| |
|
static |
◆ sort_increasing_Y()
Definition at line 40 of file SkEdgeClipper.cpp.
40 {
41
45 }
46 return true;
47 } else {
49 return false;
50 }
51}
◆ too_big_for_reliable_float_math()
static bool too_big_for_reliable_float_math |
( |
const SkRect & |
r | ) |
|
|
static |
Definition at line 411 of file SkEdgeClipper.cpp.
411 {
412
413
414
415
416
417
420}
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds