Flutter Engine
 
Loading...
Searching...
No Matches
flutter::RSuperellipse Class Reference

#include <rsuperellipse.h>

Inheritance diagram for flutter::RSuperellipse:
flutter::RefCountedDartWrappable< RSuperellipse > fml::RefCountedThreadSafe< T > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

 ~RSuperellipse () override
 
bool contains (double x, double y)
 
flutter::DlRoundSuperellipse rsuperellipse () const
 
impeller::RoundSuperellipseParam param () const
 
flutter::DlRect bounds () const
 
impeller::RoundingRadii radii () const
 
- Public Member Functions inherited from flutter::RefCountedDartWrappable< RSuperellipse >
virtual void RetainDartWrappableReference () const override
 
virtual void ReleaseDartWrappableReference () const override
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< T >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 
- Public Member Functions inherited from tonic::DartWrappable
 DartWrappable ()
 
virtual const DartWrapperInfoGetDartWrapperInfo () const =0
 
Dart_Handle CreateDartWrapper (DartState *dart_state)
 
void AssociateWithDartWrapper (Dart_Handle wrappable)
 
void ClearDartWrapper ()
 
Dart_WeakPersistentHandle dart_wrapper () const
 

Static Public Member Functions

static void Create (Dart_Handle wrapper, double left, double top, double right, double bottom, double tl_radius_x, double tl_radius_y, double tr_radius_x, double tr_radius_y, double br_radius_x, double br_radius_y, double bl_radius_x, double bl_radius_y)
 

Additional Inherited Members

- Public Types inherited from tonic::DartWrappable
enum  DartNativeFields {
  kPeerIndex ,
  kNumberOfNativeFields
}
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< T >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 
- Protected Member Functions inherited from tonic::DartWrappable
virtual ~DartWrappable ()
 
- Static Protected Member Functions inherited from tonic::DartWrappable
static Dart_PersistentHandle GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info)
 

Detailed Description

Definition at line 16 of file rsuperellipse.h.

Constructor & Destructor Documentation

◆ ~RSuperellipse()

flutter::RSuperellipse::~RSuperellipse ( )
overridedefault

Member Function Documentation

◆ bounds()

flutter::DlRect flutter::RSuperellipse::bounds ( ) const
inline

Definition at line 41 of file rsuperellipse.h.

41{ return bounds_; }

Referenced by flutter::CanvasPath::addRSuperellipse().

◆ contains()

bool flutter::RSuperellipse::contains ( double  x,
double  y 
)

Definition at line 83 of file rsuperellipse.cc.

83 {
85 if (!bounds_.Contains(point)) {
86 return false;
87 }
88 return param().Contains(point);
89}
impeller::RoundSuperellipseParam param() const
int32_t x
double y
static float SafeNarrow(double value)
impeller::Point DlPoint
bool Contains(const Point &point) const
constexpr bool Contains(const TPoint< Type > &p) const
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
Definition rect.h:231

References impeller::RoundSuperellipseParam::Contains(), impeller::TRect< T >::Contains(), param(), flutter::SafeNarrow(), x, and y.

◆ Create()

void flutter::RSuperellipse::Create ( Dart_Handle  wrapper,
double  left,
double  top,
double  right,
double  bottom,
double  tl_radius_x,
double  tl_radius_y,
double  tr_radius_x,
double  tr_radius_y,
double  br_radius_x,
double  br_radius_y,
double  bl_radius_x,
double  bl_radius_y 
)
static

Definition at line 45 of file rsuperellipse.cc.

57 {
59 auto res = fml::MakeRefCounted<RSuperellipse>(
60 BuildBounds(SafeNarrow(left), SafeNarrow(top), SafeNarrow(right),
61 SafeNarrow(bottom)),
62 BuildRadii(SafeNarrow(tl_radius_x), SafeNarrow(tl_radius_y),
63 SafeNarrow(tr_radius_x), SafeNarrow(tr_radius_y),
64 SafeNarrow(br_radius_x), SafeNarrow(br_radius_y),
65 SafeNarrow(bl_radius_x), SafeNarrow(bl_radius_y)));
66 res->AssociateWithDartWrapper(wrapper);
67}
static void ThrowIfUIOperationsProhibited()

References flutter::SafeNarrow(), and flutter::UIDartState::ThrowIfUIOperationsProhibited().

◆ param()

impeller::RoundSuperellipseParam flutter::RSuperellipse::param ( ) const

Definition at line 79 of file rsuperellipse.cc.

79 {
81}
static RoundSuperellipseParam MakeBoundsRadii(const Rect &bounds, const RoundingRadii &radii)

References impeller::RoundSuperellipseParam::MakeBoundsRadii().

Referenced by contains().

◆ radii()

impeller::RoundingRadii flutter::RSuperellipse::radii ( ) const
inline

Definition at line 42 of file rsuperellipse.h.

42{ return radii_; }

Referenced by flutter::CanvasPath::addRSuperellipse().

◆ rsuperellipse()

flutter::DlRoundSuperellipse flutter::RSuperellipse::rsuperellipse ( ) const

Definition at line 75 of file rsuperellipse.cc.

75 {
76 return flutter::DlRoundSuperellipse::MakeRectRadii(bounds_, radii_);
77}
static RoundSuperellipse MakeRectRadii(const Rect &rect, const RoundingRadii &radii)

References impeller::RoundSuperellipse::MakeRectRadii().

Referenced by flutter::Canvas::clipRSuperellipse(), flutter::Canvas::drawRSuperellipse(), and flutter::SceneBuilder::pushClipRSuperellipse().


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