Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 102 of file SkPath.cpp.

Constructor & Destructor Documentation

◆ SkAutoPathBoundsUpdate()

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

Definition at line 104 of file SkPath.cpp.

104 : fPath(path), fRect(r) {
105 // Cannot use fRect for our bounds unless we know it is sorted
106 fRect.sort();
107 // Mark the path's bounds as dirty if (1) they are, or (2) the path
108 // is non-finite, and therefore its bounds are not meaningful
109 fHasValidBounds = path->hasComputedBounds() && path->isFinite();
110 fEmpty = path->isEmpty();
111 if (fHasValidBounds && !fEmpty) {
112 joinNoEmptyChecks(&fRect, fPath->getBounds());
113 }
114 fDegenerate = is_degenerate(*path);
115 }
static bool is_degenerate(const SkPath &path)
Definition SkPath.cpp:71
static void joinNoEmptyChecks(SkRect *dst, const SkRect &src)
Definition SkPath.cpp:64
const SkRect & getBounds() const
Definition SkPath.cpp:420
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 117 of file SkPath.cpp.

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

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