Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkAutoPathBoundsUpdate Class Reference

Public Member Functions

 SkAutoPathBoundsUpdate (SkPath *path, const SkRect &r)
 
 ~SkAutoPathBoundsUpdate ()
 

Detailed Description

Definition at line 104 of file SkPath.cpp.

Constructor & Destructor Documentation

◆ SkAutoPathBoundsUpdate()

SkAutoPathBoundsUpdate::SkAutoPathBoundsUpdate ( SkPath path,
const SkRect r 
)
inline

Definition at line 106 of file SkPath.cpp.

106 : fPath(path), fRect(r) {
107 // Cannot use fRect for our bounds unless we know it is sorted
108 fRect.sort();
109 // Mark the path's bounds as dirty if (1) they are, or (2) the path
110 // is non-finite, and therefore its bounds are not meaningful
111 fHasValidBounds = path->hasComputedBounds() && path->isFinite();
112 fEmpty = path->isEmpty();
113 if (fHasValidBounds && !fEmpty) {
114 joinNoEmptyChecks(&fRect, fPath->getBounds());
115 }
116 fDegenerate = is_degenerate(*path);
117 }
static bool is_degenerate(const SkPath &path)
Definition: SkPath.cpp:73
static void joinNoEmptyChecks(SkRect *dst, const SkRect &src)
Definition: SkPath.cpp:66
const SkRect & getBounds() const
Definition: SkPath.cpp:430
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
void sort()
Definition: SkRect.h:1313

◆ ~SkAutoPathBoundsUpdate()

SkAutoPathBoundsUpdate::~SkAutoPathBoundsUpdate ( )
inline

Definition at line 119 of file SkPath.cpp.

119 {
120 fPath->setConvexity(fDegenerate ? SkPathConvexity::kConvex
122 if ((fEmpty || fHasValidBounds) && fRect.isFinite()) {
123 fPath->setBounds(fRect);
124 }
125 }
bool isFinite() const
Definition: SkRect.h:711

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