#include <SkRectPriv.h>
|
static SkIRect | MakeILarge () |
|
static SkIRect | MakeILargestInverted () |
|
static SkRect | MakeLargeS32 () |
|
static SkRect | MakeLargest () |
|
static constexpr SkRect | MakeLargestInverted () |
|
static void | GrowToInclude (SkRect *r, const SkPoint &pt) |
|
static bool | FitsInFixed (const SkRect &r) |
|
static constexpr float | HalfWidth (const SkRect &r) |
|
static constexpr float | HalfHeight (const SkRect &r) |
|
static bool | Subtract (const SkRect &a, const SkRect &b, SkRect *out) |
|
static bool | Subtract (const SkIRect &a, const SkIRect &b, SkIRect *out) |
|
static SkRect | Subtract (const SkRect &a, const SkRect &b) |
|
static SkIRect | Subtract (const SkIRect &a, const SkIRect &b) |
|
static bool | QuadContainsRect (const SkMatrix &m, const SkIRect &a, const SkIRect &b, float tol=0.f) |
|
static bool | QuadContainsRect (const SkM44 &m, const SkRect &a, const SkRect &b, float tol=0.f) |
|
static skvx::int4 | QuadContainsRectMask (const SkM44 &m, const SkRect &a, const SkRect &b, float tol=0.f) |
|
static SkIRect | ClosestDisjointEdge (const SkIRect &src, const SkIRect &dst) |
|
Definition at line 18 of file SkRectPriv.h.
◆ ClosestDisjointEdge()
Definition at line 323 of file SkRect.cpp.
323 {
324 if (
src.isEmpty() ||
dst.isEmpty()) {
326 }
327
330 if (r <=
dst.fLeft) {
331
332 l = r - 1;
333 }
else if (l >=
dst.fRight) {
334
335 r = l + 1;
336 } else {
337
340 }
341
345
347 }
else if (t >=
dst.fBottom) {
348
350 } else {
353 }
354
356}
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
static constexpr SkIRect MakeLTRB(int32_t l, int32_t t, int32_t r, int32_t b)
static constexpr SkIRect MakeEmpty()
◆ FitsInFixed()
static bool SkRectPriv::FitsInFixed |
( |
const SkRect & |
r | ) |
|
|
inlinestatic |
Definition at line 56 of file SkRectPriv.h.
56 {
59 }
static bool SkFitsInFixed(T x)
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds
◆ GrowToInclude()
static void SkRectPriv::GrowToInclude |
( |
SkRect * |
r, |
|
|
const SkPoint & |
pt |
|
) |
| |
|
inlinestatic |
Definition at line 47 of file SkRectPriv.h.
47 {
52 }
static float max(float r, float g, float b)
static float min(float r, float g, float b)
◆ HalfHeight()
static constexpr float SkRectPriv::HalfHeight |
( |
const SkRect & |
r | ) |
|
|
inlinestaticconstexpr |
Definition at line 66 of file SkRectPriv.h.
66 {
68 }
static constexpr float sk_float_midpoint(float a, float b)
◆ HalfWidth()
static constexpr float SkRectPriv::HalfWidth |
( |
const SkRect & |
r | ) |
|
|
inlinestaticconstexpr |
◆ MakeILarge()
static SkIRect SkRectPriv::MakeILarge |
( |
| ) |
|
|
inlinestatic |
Definition at line 22 of file SkRectPriv.h.
22 {
23
24
25 const int32_t large = 1 << 29;
26 return { -large, -large, large, large };
27 }
◆ MakeILargestInverted()
static SkIRect SkRectPriv::MakeILargestInverted |
( |
| ) |
|
|
inlinestatic |
Definition at line 29 of file SkRectPriv.h.
29 {
31 }
static constexpr int32_t SK_MinS32
static constexpr int32_t SK_MaxS32
◆ MakeLargeS32()
static SkRect SkRectPriv::MakeLargeS32 |
( |
| ) |
|
|
inlinestatic |
Definition at line 33 of file SkRectPriv.h.
33 {
36 return r;
37 }
static SkIRect MakeILarge()
void set(const SkIRect &src)
◆ MakeLargest()
static SkRect SkRectPriv::MakeLargest |
( |
| ) |
|
|
inlinestatic |
◆ MakeLargestInverted()
static constexpr SkRect SkRectPriv::MakeLargestInverted |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ QuadContainsRect() [1/2]
bool SkRectPriv::QuadContainsRect |
( |
const SkM44 & |
m, |
|
|
const SkRect & |
a, |
|
|
const SkRect & |
b, |
|
|
float |
tol = 0.f |
|
) |
| |
|
static |
Definition at line 268 of file SkRect.cpp.
268 {
270}
static skvx::int4 QuadContainsRectMask(const SkM44 &m, const SkRect &a, const SkRect &b, float tol=0.f)
SIT bool all(const Vec< 1, T > &x)
◆ QuadContainsRect() [2/2]
bool SkRectPriv::QuadContainsRect |
( |
const SkMatrix & |
m, |
|
|
const SkIRect & |
a, |
|
|
const SkIRect & |
b, |
|
|
float |
tol = 0.f |
|
) |
| |
|
static |
Definition at line 261 of file SkRect.cpp.
264 {
266}
static bool QuadContainsRect(const SkMatrix &m, const SkIRect &a, const SkIRect &b, float tol=0.f)
static SkRect Make(const SkISize &size)
◆ QuadContainsRectMask()
Definition at line 272 of file SkRect.cpp.
275 {
278
279
280
281
284 }
285
286
287
288
291
292 auto max =
m.rc(0,0)*
ax +
m.rc(0,1)*ay +
m.rc(0,3);
293 auto may =
m.rc(1,0)*
ax +
m.rc(1,1)*ay +
m.rc(1,3);
294 auto maw =
m.rc(3,0)*
ax +
m.rc(3,1)*ay +
m.rc(3,3);
295
296 if (
all(maw < 0.f)) {
297
298
300 }
301
302
303 auto lA = may*skvx::shuffle<1,2,3,0>(maw) - maw*skvx::shuffle<1,2,3,0>(may);
304 auto lB = maw*skvx::shuffle<1,2,3,0>(
max) -
max*skvx::shuffle<1,2,3,0>(maw);
305 auto lC =
max*skvx::shuffle<1,2,3,0>(may) - may*skvx::shuffle<1,2,3,0>(
max);
306
307
308
309 float sign = (lA[0]*lB[1] - lB[0]*lA[1]) < 0 ? -1.f : 1.f;
310
311
312
313 SkRect bInset =
b.makeInset(tol, tol);
318
319
320 return (d0 >= 0.f) & (d1 >= 0.f) & (d2 >= 0.f) & (d3 >= 0.f);
321}
static int sign(SkScalar x)
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
◆ Subtract() [1/4]
Definition at line 83 of file SkRectPriv.h.
83 {
86 return diff;
87 }
static bool Subtract(const SkRect &a, const SkRect &b, SkRect *out)
◆ Subtract() [2/4]
Definition at line 256 of file SkRect.cpp.
256 {
257 return subtract<SkIRect>(
a,
b,
out);
258}
◆ Subtract() [3/4]
◆ Subtract() [4/4]
Definition at line 252 of file SkRect.cpp.
252 {
253 return subtract<SkRect>(
a,
b,
out);
254}
The documentation for this class was generated from the following files: