Flutter Engine
 
Loading...
Searching...
No Matches
impeller::interop::Path Class Referencefinal

#include <path.h>

Inheritance diagram for impeller::interop::Path:
impeller::interop::Object< Path, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPath)> impeller::interop::ObjectBase

Public Member Functions

 Path (const SkPath &path)
 
 ~Path ()
 
 Path (const Path &)=delete
 
Pathoperator= (const Path &)=delete
 
SkPath GetPath () const
 
ImpellerRect GetBounds () const
 
- Public Member Functions inherited from impeller::interop::ObjectBase
 ObjectBase ()=default
 
virtual ~ObjectBase ()=default
 
 ObjectBase (const ObjectBase &)=delete
 
 ObjectBase (ObjectBase &&)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
ObjectBaseoperator= (ObjectBase &&)=delete
 
void Retain ()
 
void Release ()
 
uint64_t GetRefCountForTests () const
 

Additional Inherited Members

- Public Types inherited from impeller::interop::Object< Path, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPath)>
using InteropClass = Path
 
using InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerPath)
 
- Static Public Member Functions inherited from impeller::interop::ObjectBase
static void SafeRetain (void *ptr)
 
static void SafeRelease (void *ptr)
 

Detailed Description

Definition at line 15 of file path.h.

Constructor & Destructor Documentation

◆ Path() [1/2]

impeller::interop::Path::Path ( const SkPath &  path)
explicit

Definition at line 11 of file path.cc.

11: path_(SkPathBuilder(path)) {}

◆ ~Path()

impeller::interop::Path::~Path ( )
default

◆ Path() [2/2]

impeller::interop::Path::Path ( const Path )
delete

Member Function Documentation

◆ GetBounds()

ImpellerRect impeller::interop::Path::GetBounds ( ) const

Definition at line 19 of file path.cc.

19 {
20 const auto bounds = path_.computeFiniteBounds().value_or(SkRect());
21 return ImpellerRect{
22 .x = bounds.x(),
23 .y = bounds.y(),
24 .width = bounds.width(),
25 .height = bounds.height(),
26 };
27}

References ImpellerRect::x.

◆ GetPath()

SkPath impeller::interop::Path::GetPath ( ) const

Definition at line 15 of file path.cc.

15 {
16 return path_.snapshot();
17}

◆ operator=()

Path & impeller::interop::Path::operator= ( const Path )
delete

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