Go to the source code of this file.
|
static bool | intersect (const SkPoint &p0, const SkPoint &n0, const SkPoint &p1, const SkPoint &n1, SkScalar *t) |
|
static bool | perp_intersect (const SkPoint &p0, const SkPoint &n0, const SkPoint &p1, const SkPoint &perp, SkScalar *t) |
|
static bool | duplicate_pt (const SkPoint &p0, const SkPoint &p1) |
|
static bool | points_are_colinear_and_b_is_middle (const SkPoint &a, const SkPoint &b, const SkPoint &c, float *accumError) |
|
static SkScalar | compute_coverage (SkScalar depth, SkScalar initialDepth, SkScalar initialCoverage, SkScalar targetDepth, SkScalar targetCoverage) |
|
◆ compute_coverage()
Definition at line 683 of file GrAAConvexTessellator.cpp.
684 {
686 return targetCoverage;
687 }
688 SkScalar result = (depth - initialDepth) / (targetDepth - initialDepth) *
689 (targetCoverage - initialCoverage) + initialCoverage;
691}
static bool SkScalarNearlyEqual(SkScalar x, SkScalar y, SkScalar tolerance=SK_ScalarNearlyZero)
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
◆ duplicate_pt()
Definition at line 70 of file GrAAConvexTessellator.cpp.
70 {
73}
static constexpr SkScalar kCloseSqd
static SkScalar DistanceToSqd(const SkPoint &pt, const SkPoint &a)
◆ intersect()
Definition at line 44 of file GrAAConvexTessellator.cpp.
46 {
50 return false;
51 }
52 *t = (v.
fX * n1.
fY - v.
fY * n1.
fX) / perpDot;
54}
static bool SkIsFinite(T x, Pack... values)
static bool SkScalarNearlyZero(SkScalar x, SkScalar tolerance=SK_ScalarNearlyZero)
◆ perp_intersect()
Definition at line 58 of file GrAAConvexTessellator.cpp.
60 {
64 return false;
65 }
66 *t = v.
dot(perp) / perpDot;
68}
float dot(const SkVector &vec) const
◆ points_are_colinear_and_b_is_middle()
static bool points_are_colinear_and_b_is_middle |
( |
const SkPoint & |
a, |
|
|
const SkPoint & |
b, |
|
|
const SkPoint & |
c, |
|
|
float * |
accumError |
|
) |
| |
|
static |
Definition at line 75 of file GrAAConvexTessellator.cpp.
76 {
77
81
83 if (*accumError + distBToLineAC >=
kClose || aToC.
dot(
b -
a) <= 0.f || aToC.
dot(c -
b) <= 0.f) {
84
85 return false;
86 } else {
87
88
89 *accumError += distBToLineAC;
90 return true;
91 }
92}
static constexpr SkScalar kClose
◆ kClose
◆ kCloseSqd
constexpr SkScalar kCloseSqd = kClose * kClose |
|
staticconstexpr |
◆ kConicTolerance
constexpr SkScalar kConicTolerance = 0.25f |
|
staticconstexpr |
◆ kCubicTolerance
constexpr SkScalar kCubicTolerance = 0.2f |
|
staticconstexpr |
◆ kCubicToleranceSqd
◆ kCurveConnectionThreshold
constexpr SkScalar kCurveConnectionThreshold = 0.8f |
|
staticconstexpr |
◆ kQuadTolerance
constexpr SkScalar kQuadTolerance = 0.2f |
|
staticconstexpr |
◆ kQuadToleranceSqd
◆ kRoundCapThreshold
constexpr SkScalar kRoundCapThreshold = 0.8f |
|
staticconstexpr |