Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
SkPathOpsBounds Struct Reference

#include <SkPathOpsBounds.h>

Inheritance diagram for SkPathOpsBounds:
SkRect

Public Types

using INHERITED = SkRect
 

Public Member Functions

void add (SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)
 
void add (const SkPathOpsBounds &toAdd)
 
void add (const SkPoint &pt)
 
void add (const SkDPoint &pt)
 
bool almostContains (const SkPoint &pt) const
 
bool contains (const SkPoint &pt) const
 
- Public Member Functions inherited from SkRect
bool contains (SkScalar x, SkScalar y) const
 
bool isEmpty () const
 
bool isSorted () const
 
bool isFinite () const
 
constexpr float x () const
 
constexpr float y () const
 
constexpr float left () const
 
constexpr float top () const
 
constexpr float right () const
 
constexpr float bottom () const
 
constexpr float width () const
 
constexpr float height () const
 
constexpr float centerX () const
 
constexpr float centerY () const
 
constexpr SkPoint center () const
 
void toQuad (SkPoint quad[4]) const
 
void setEmpty ()
 
void set (const SkIRect &src)
 
void setLTRB (float left, float top, float right, float bottom)
 
void setBounds (const SkPoint pts[], int count)
 
bool setBoundsCheck (const SkPoint pts[], int count)
 
void setBoundsNoCheck (const SkPoint pts[], int count)
 
void set (const SkPoint &p0, const SkPoint &p1)
 
void setXYWH (float x, float y, float width, float height)
 
void setWH (float width, float height)
 
void setIWH (int32_t width, int32_t height)
 
constexpr SkRect makeOffset (float dx, float dy) const
 
constexpr SkRect makeOffset (SkVector v) const
 
SkRect makeInset (float dx, float dy) const
 
SkRect makeOutset (float dx, float dy) const
 
void offset (float dx, float dy)
 
void offset (const SkPoint &delta)
 
void offsetTo (float newX, float newY)
 
void inset (float dx, float dy)
 
void outset (float dx, float dy)
 
bool intersect (const SkRect &r)
 
bool intersect (const SkRect &a, const SkRect &b)
 
bool intersects (const SkRect &r) const
 
void join (const SkRect &r)
 
void joinNonEmptyArg (const SkRect &r)
 
void joinPossiblyEmptyRect (const SkRect &r)
 
bool contains (float x, float y) const
 
bool contains (const SkRect &r) const
 
bool contains (const SkIRect &r) const
 
void round (SkIRect *dst) const
 
void roundOut (SkIRect *dst) const
 
void roundOut (SkRect *dst) const
 
void roundIn (SkIRect *dst) const
 
SkIRect round () const
 
SkIRect roundOut () const
 
SkIRect roundIn () const
 
void sort ()
 
SkRect makeSorted () const
 
const float * asScalars () const
 
void dump (bool asHex) const
 
void dump () const
 
void dumpHex () const
 

Static Public Member Functions

static bool Intersects (const SkPathOpsBounds &a, const SkPathOpsBounds &b)
 
- Static Public Member Functions inherited from SkRect
static constexpr SkRect MakeEmpty ()
 
static constexpr SkRect MakeWH (float w, float h)
 
static SkRect MakeIWH (int w, int h)
 
static constexpr SkRect MakeSize (const SkSize &size)
 
static constexpr SkRect MakeLTRB (float l, float t, float r, float b)
 
static constexpr SkRect MakeXYWH (float x, float y, float w, float h)
 
static SkRect Make (const SkISize &size)
 
static SkRect Make (const SkIRect &irect)
 
static bool Intersects (const SkRect &a, const SkRect &b)
 

Additional Inherited Members

- Public Attributes inherited from SkRect
SkScalar fLeft
 smaller x-axis bounds
 
SkScalar fTop
 smaller y-axis bounds
 
SkScalar fRight
 larger x-axis bounds
 
SkScalar fBottom
 larger y-axis bounds
 
float fLeft = 0
 smaller x-axis bounds
 
float fTop = 0
 smaller y-axis bounds
 
float fRight = 0
 larger x-axis bounds
 
float fBottom = 0
 larger y-axis bounds
 

Detailed Description

Definition at line 14 of file SkPathOpsBounds.h.

Member Typedef Documentation

◆ INHERITED

Definition at line 62 of file SkPathOpsBounds.h.

Member Function Documentation

◆ add() [1/4]

void SkPathOpsBounds::add ( const SkDPoint pt)
inline

Definition at line 43 of file SkPathOpsBounds.h.

43 {
44 if (pt.fX < fLeft) fLeft = SkDoubleToScalar(pt.fX);
45 if (pt.fY < fTop) fTop = SkDoubleToScalar(pt.fY);
46 if (pt.fX > fRight) fRight = SkDoubleToScalar(pt.fX);
47 if (pt.fY > fBottom) fBottom = SkDoubleToScalar(pt.fY);
48 }
#define SkDoubleToScalar(x)
Definition SkScalar.h:64
SkScalar fBottom
larger y-axis bounds
Definition extension.cpp:17
SkScalar fLeft
smaller x-axis bounds
Definition extension.cpp:14
SkScalar fRight
larger x-axis bounds
Definition extension.cpp:16
SkScalar fTop
smaller y-axis bounds
Definition extension.cpp:15

◆ add() [2/4]

void SkPathOpsBounds::add ( const SkPathOpsBounds toAdd)
inline

Definition at line 32 of file SkPathOpsBounds.h.

32 {
33 add(toAdd.fLeft, toAdd.fTop, toAdd.fRight, toAdd.fBottom);
34 }
void add(SkScalar left, SkScalar top, SkScalar right, SkScalar bottom)

◆ add() [3/4]

void SkPathOpsBounds::add ( const SkPoint pt)
inline

Definition at line 36 of file SkPathOpsBounds.h.

36 {
37 if (pt.fX < fLeft) fLeft = pt.fX;
38 if (pt.fY < fTop) fTop = pt.fY;
39 if (pt.fX > fRight) fRight = pt.fX;
40 if (pt.fY > fBottom) fBottom = pt.fY;
41 }
float fX
x-axis value
float fY
y-axis value

◆ add() [4/4]

void SkPathOpsBounds::add ( SkScalar  left,
SkScalar  top,
SkScalar  right,
SkScalar  bottom 
)
inline

Definition at line 25 of file SkPathOpsBounds.h.

25 {
26 if (left < fLeft) fLeft = left;
27 if (top < fTop) fTop = top;
28 if (right > fRight) fRight = right;
30 }
constexpr float left() const
Definition SkRect.h:734
constexpr float top() const
Definition SkRect.h:741
constexpr float right() const
Definition SkRect.h:748
constexpr float bottom() const
Definition SkRect.h:755

◆ almostContains()

bool SkPathOpsBounds::almostContains ( const SkPoint pt) const
inline

Definition at line 50 of file SkPathOpsBounds.h.

50 {
55 }
bool AlmostLessOrEqualUlps(float a, float b)

◆ contains()

bool SkPathOpsBounds::contains ( const SkPoint pt) const
inline

Definition at line 57 of file SkPathOpsBounds.h.

57 {
58 return fLeft <= pt.fX && fTop <= pt.fY &&
59 fRight >= pt.fX && fBottom >= pt.fY;
60 }

◆ Intersects()

static bool SkPathOpsBounds::Intersects ( const SkPathOpsBounds a,
const SkPathOpsBounds b 
)
inlinestatic

Definition at line 15 of file SkPathOpsBounds.h.

15 {
16 return AlmostLessOrEqualUlps(a.fLeft, b.fRight)
17 && AlmostLessOrEqualUlps(b.fLeft, a.fRight)
18 && AlmostLessOrEqualUlps(a.fTop, b.fBottom)
19 && AlmostLessOrEqualUlps(b.fTop, a.fBottom);
20 }
static bool b
struct MyStruct a[10]

The documentation for this struct was generated from the following file: